2009-07-18 08:02:13 -04:00
|
|
|
IN: vocabs.parser.tests
|
2010-01-27 02:26:40 -05:00
|
|
|
USING: vocabs.parser tools.test eval kernel accessors definitions
|
|
|
|
compiler.units words vocabs ;
|
2009-07-18 08:02:13 -04:00
|
|
|
|
|
|
|
[ "FROM: kernel => doesnotexist ;" eval( -- ) ]
|
|
|
|
[ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ]
|
|
|
|
must-fail-with
|
|
|
|
|
|
|
|
[ "RENAME: doesnotexist kernel => newname" eval( -- ) ]
|
|
|
|
[ error>> T{ no-word-in-vocab { word "doesnotexist" } { vocab "kernel" } } = ]
|
2010-01-27 02:26:40 -05:00
|
|
|
must-fail-with
|
|
|
|
|
|
|
|
: aaa ( -- ) ;
|
|
|
|
|
|
|
|
[
|
|
|
|
[ ] [ "aaa" "vocabs.parser.tests" "uutt" add-renamed-word ] unit-test
|
|
|
|
|
|
|
|
[ ] [ "vocabs.parser.tests" dup add-qualified ] unit-test
|
|
|
|
|
|
|
|
[ aaa ] [ "uutt" search ] unit-test
|
|
|
|
[ aaa ] [ "vocabs.parser.tests:aaa" search ] unit-test
|
|
|
|
|
2015-06-08 15:38:38 -04:00
|
|
|
[ ] [ [ "bbb" "vocabs.parser.tests" create-word drop ] with-compilation-unit ] unit-test
|
2010-01-27 02:26:40 -05:00
|
|
|
|
|
|
|
[ "bbb" ] [ "vocabs.parser.tests:bbb" search name>> ] unit-test
|
|
|
|
|
|
|
|
[ ] [ [ \ aaa forget ] with-compilation-unit ] unit-test
|
|
|
|
|
2011-11-06 18:57:24 -05:00
|
|
|
[ ] [ [ "bbb" "vocabs.parser.tests" lookup-word forget ] with-compilation-unit ] unit-test
|
2010-01-27 02:26:40 -05:00
|
|
|
|
|
|
|
[ f ] [ "uutt" search ] unit-test
|
|
|
|
|
|
|
|
[ f ] [ "vocabs.parser.tests:aaa" search ] unit-test
|
|
|
|
|
|
|
|
[ ] [ "vocabs.parser.tests.foo" set-current-vocab ] unit-test
|
|
|
|
|
2015-06-08 15:38:38 -04:00
|
|
|
[ ] [ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] unit-test
|
|
|
|
|
2010-01-27 02:26:40 -05:00
|
|
|
[ t ] [ "bbb" search >boolean ] unit-test
|
|
|
|
|
|
|
|
[ ] [ [ "vocabs.parser.tests.foo" forget-vocab ] with-compilation-unit ] unit-test
|
2015-06-08 15:38:38 -04:00
|
|
|
|
|
|
|
[ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] [ error>> no-current-vocab-error? ] must-fail-with
|
2010-01-27 02:26:40 -05:00
|
|
|
|
2012-06-21 14:54:12 -04:00
|
|
|
[ begin-private ] [ error>> no-current-vocab-error? ] must-fail-with
|
2010-01-27 02:26:40 -05:00
|
|
|
|
2012-06-21 14:54:12 -04:00
|
|
|
[ end-private ] [ error>> no-current-vocab-error? ] must-fail-with
|
2010-01-27 02:26:40 -05:00
|
|
|
|
|
|
|
[ f ] [ "bbb" search >boolean ] unit-test
|
2015-06-08 15:38:38 -04:00
|
|
|
|
2011-11-06 18:57:24 -05:00
|
|
|
] with-manifest
|