1 USING: tools.test tools.annotations tools.time math parser eval
2 io.streams.string kernel ;
3 IN: tools.annotations.tests
11 GENERIC: some-generic ( a -- b )
13 M: integer some-generic 1+ ;
15 [ 4 ] [ 3 some-generic ] unit-test
17 [ ] [ \ some-generic watch ] unit-test
19 [ 4 ] [ 3 some-generic ] unit-test
21 [ ] [ "IN: tools.annotations.tests USE: math M: integer some-generic 1- ;" eval ] unit-test
23 [ 2 ] [ 3 some-generic ] unit-test
25 [ ] [ \ some-generic reset ] unit-test
27 [ 2 ] [ 3 some-generic ] unit-test
30 GENERIC: another-generic ( a -- b )
32 M: object another-generic ;
34 \ another-generic watch
36 [ ] [ "IN: tools.annotations.tests GENERIC: another-generic ( a -- b )" eval ] unit-test
38 [ ] [ \ another-generic reset ] unit-test
40 [ "" ] [ [ 3 another-generic drop ] with-string-writer ] unit-test