don't want to filter nonword annotation usages

db4
Joe Groff 2009-02-11 18:58:42 -06:00
parent 6c723642bd
commit 87c9ab72c3
2 changed files with 14 additions and 4 deletions

View File

@ -1,9 +1,12 @@
USING: annotations math sorting tools.test ;
USING: accessors annotations combinators.short-circuit
io.pathnames kernel math sequences sorting tools.test ;
IN: annotations.tests
!NOTE testing toplevel form
: three ( -- x )
!BROKEN find a dictionary
"threa" ;
!BROKEN english plz
"þrij" ;
: four ( -- x )
!BROKEN this code is broken
@ -13,5 +16,12 @@ IN: annotations.tests
!TODO return 5
f ;
[ t ] [
NOTEs {
[ length 1 = ]
[ first string>> file-name "annotations-tests.factor" = ]
} 1&&
] unit-test
[ { four three } ] [ BROKENs natural-sort ] unit-test
[ { five } ] [ TODOs ] unit-test

View File

@ -10,7 +10,7 @@ IN: annotations
: (non-annotation-usage) ( word -- usages )
smart-usage
[ { [ word? ] [ vocabulary>> "annotations" = not ] } 1&& ]
[ { [ word? ] [ vocabulary>> "annotations" = ] } 1&& not ]
filter ;
FUNCTOR: define-annotation ( NAME -- )