-USING: math definitions help.topics help tools.test
+USING: math definitions help.topics help tools.test sets
prettyprint parser io.streams.string kernel source-files
assocs namespaces words io sequences eval accessors see ;
IN: help.definitions.tests
"IN: help.definitions.tests USING: help.syntax ; : hello ( -- ) ; HELP: hello \"test\" ; ARTICLE: \"hello\" \"world\" ; ARTICLE: \"hello2\" \"world\" ;" <string-reader> "foo"
parse-stream drop
- "foo" source-file definitions>> first assoc-size
+ "foo" source-file definitions>> first cardinality
] unit-test
[ t ] [ "hello" articles get key? ] unit-test
"IN: help.definitions.tests USING: help.syntax ; : hello ( -- ) ; ARTICLE: \"hello\" \"world\" ;" <string-reader> "foo"
parse-stream drop
- "foo" source-file definitions>> first assoc-size
+ "foo" source-file definitions>> first cardinality
] unit-test
[ t ] [ "hello" articles get key? ] unit-test
"IN: parser.tests : smudge-me ( -- ) ;" <string-reader> "foo"
parse-stream drop
- "foo" source-file definitions>> first assoc-size
+ "foo" source-file definitions>> first cardinality
] unit-test
[ t ] [ "smudge-me" "parser.tests" lookup-word >boolean ] unit-test
"IN: parser.tests USING: math strings ; GENERIC: smudge-me ( a -- b ) M: integer smudge-me ; M: string smudge-me ;" <string-reader> "foo"
parse-stream drop
- "foo" source-file definitions>> first assoc-size
+ "foo" source-file definitions>> first cardinality
] unit-test
[ 1 ] [
"IN: parser.tests USING: arrays ; M: array smudge-me ;" <string-reader> "bar"
parse-stream drop
- "bar" source-file definitions>> first assoc-size
+ "bar" source-file definitions>> first cardinality
] unit-test
[ 2 ] [
"IN: parser.tests USING: math strings ; GENERIC: smudge-me ( a -- b ) M: integer smudge-me ;" <string-reader> "foo"
parse-stream drop
- "foo" source-file definitions>> first assoc-size
+ "foo" source-file definitions>> first cardinality
] unit-test
[ t ] [
USING: vocabs.loader tools.test continuations vocabs math
-kernel arrays sequences namespaces io.streams.string
+kernel arrays sequences namespaces io.streams.string sets
parser source-files words assocs classes.tuple definitions
debugger compiler.units accessors eval vocabs.hierarchy
combinators vocabs.parser grouping vocabs.files vocabs.refresh ;
2 [
[ "vocabs.loader.test.a" require ] must-fail
-
+
[ f ] [ "vocabs.loader.test.a" lookup-vocab source-loaded?>> ] unit-test
-
+
[ t ] [
"resource:core/vocabs/loader/test/a/a.factor"
source-file definitions>> dup USE: prettyprint .
"v-l-t-a-hello" "vocabs.loader.test.a" lookup-word dup .
- swap first key?
+ swap first in?
] unit-test
] times