]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/annotations/annotations-tests.factor
Fix permission bits
[factor.git] / basis / tools / annotations / annotations-tests.factor
1 USING: tools.test tools.annotations math parser eval
2 io.streams.string kernel ;
3 IN: tools.annotations.tests
4
5 : foo ;
6 \ foo watch
7
8 [ ] [ foo ] unit-test
9
10 ! erg's bug
11 GENERIC: some-generic ( a -- b )
12
13 M: integer some-generic 1+ ;
14
15 [ 4 ] [ 3 some-generic ] unit-test
16
17 [ ] [ \ some-generic watch ] unit-test
18
19 [ 4 ] [ 3 some-generic ] unit-test
20
21 [ ] [ "IN: tools.annotations.tests USE: math M: integer some-generic 1- ;" eval ] unit-test
22
23 [ 2 ] [ 3 some-generic ] unit-test
24
25 [ ] [ \ some-generic reset ] unit-test
26
27 [ 2 ] [ 3 some-generic ] unit-test
28
29 ! slava's bug
30 GENERIC: another-generic ( a -- b )
31
32 M: object another-generic ;
33
34 \ another-generic watch
35
36 [ ] [ "IN: tools.annotations.tests GENERIC: another-generic ( a -- b )" eval ] unit-test
37
38 [ ] [ \ another-generic reset ] unit-test
39
40 [ "" ] [ [ 3 another-generic drop ] with-string-writer ] unit-test