]> gitweb.factorcode.org Git - factor.git/commitdiff
generic.parser: adding tests.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 13 Oct 2011 23:49:54 +0000 (16:49 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 13 Oct 2011 23:49:54 +0000 (16:49 -0700)
core/generic/parser/parser-tests.factor [new file with mode: 0644]

diff --git a/core/generic/parser/parser-tests.factor b/core/generic/parser/parser-tests.factor
new file mode 100644 (file)
index 0000000..d14da1b
--- /dev/null
@@ -0,0 +1,13 @@
+USING: generic.parser tools.test ;
+
+IN: generic.parser.tests
+
+[ t ] [ (( -- )) (( -- )) method-effect= ] unit-test
+[ t ] [ (( a -- b )) (( x -- y )) method-effect= ] unit-test
+[ f ] [ (( a b -- c )) (( x -- y )) method-effect= ] unit-test
+[ f ] [ (( a -- b )) (( x y -- z )) method-effect= ] unit-test
+
+[ t ] [ (( -- * )) (( -- )) method-effect= ] unit-test
+[ f ] [ (( -- * )) (( x -- y )) method-effect= ] unit-test
+[ t ] [ (( x -- * )) (( x -- y )) method-effect= ] unit-test
+[ t ] [ (( x -- * )) (( x -- y z )) method-effect= ] unit-test