]> gitweb.factorcode.org Git - factor.git/blob - core/definitions/definitions-tests.factor
b2d265a2e3cf3a43032f048171b36086109f8f5a
[factor.git] / core / definitions / definitions-tests.factor
1 USING: tools.test generic kernel definitions sequences
2 compiler.units words ;
3 IN: definitions.tests
4
5 GENERIC: some-generic ( a -- b )
6
7 USE: arrays
8
9 M: array some-generic ;
10
11 USE: bit-arrays
12
13 M: bit-array some-generic ;
14
15 USE: byte-arrays
16
17 M: byte-array some-generic ;
18
19 TUPLE: some-class ;
20
21 M: some-class some-generic ;
22
23 TUPLE: another-class some-generic ;
24
25 [ ] [
26     [
27         {
28             some-generic
29             some-class
30             { another-class some-generic }
31         } forget-all
32     ] with-compilation-unit
33 ] unit-test