Fix some tests broken by recent definitions change.

db4
John Benediktsson 2013-03-10 20:22:18 -07:00
parent bc18b2cd29
commit b2ffa02fff
3 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
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
@ -10,7 +10,7 @@ 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
@ -23,7 +23,7 @@ IN: help.definitions.tests
"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

View File

@ -110,7 +110,7 @@ DEFER: foo
"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
@ -127,21 +127,21 @@ DEFER: foo
"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 ] [

View File

@ -1,5 +1,5 @@
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 ;
@ -41,14 +41,14 @@ IN: vocabs.loader.tests
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