1 USING: accessors compiler.units definitions eval kernel
2 tools.test vocabs vocabs.parser words ;
3 IN: vocabs.parser.tests
5 [ "FROM: kernel => doesnotexist ;" eval( -- ) ]
6 [ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ]
9 [ "RENAME: doesnotexist kernel => newname" eval( -- ) ]
10 [ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ]
16 [ ] [ "aaa" "vocabs.parser.tests" "uutt" add-renamed-word ] unit-test
18 [ ] [ "vocabs.parser.tests" dup add-qualified ] unit-test
20 [ aaa ] [ "uutt" search ] unit-test
21 [ aaa ] [ "vocabs.parser.tests:aaa" search ] unit-test
23 [ ] [ [ "bbb" "vocabs.parser.tests" create-word drop ] with-compilation-unit ] unit-test
25 [ "bbb" ] [ "vocabs.parser.tests:bbb" search name>> ] unit-test
27 [ ] [ [ \ aaa forget ] with-compilation-unit ] unit-test
29 [ ] [ [ "bbb" "vocabs.parser.tests" lookup-word forget ] with-compilation-unit ] unit-test
31 [ f ] [ "uutt" search ] unit-test
33 [ f ] [ "vocabs.parser.tests:aaa" search ] unit-test
35 [ ] [ "vocabs.parser.tests.foo" set-current-vocab ] unit-test
37 [ ] [ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] unit-test
39 [ t ] [ "bbb" search >boolean ] unit-test
41 [ ] [ [ "vocabs.parser.tests.foo" forget-vocab ] with-compilation-unit ] unit-test
43 [ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] [ error>> no-current-vocab-error? ] must-fail-with
45 [ begin-private ] [ error>> no-current-vocab-error? ] must-fail-with
47 [ end-private ] [ error>> no-current-vocab-error? ] must-fail-with
49 [ f ] [ "bbb" search >boolean ] unit-test