From ec95cef85ecaa3192eada818bed1724a21c46a0a Mon Sep 17 00:00:00 2001 From: James Cash Date: Tue, 29 Apr 2008 23:10:47 -0400 Subject: [PATCH] Adding more tests --- extra/lisp/lisp-tests.factor | 8 ++++++-- extra/lisp/parser/parser-tests.factor | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extra/lisp/lisp-tests.factor b/extra/lisp/lisp-tests.factor index 6266693571..3e3e05b2ea 100644 --- a/extra/lisp/lisp-tests.factor +++ b/extra/lisp/lisp-tests.factor @@ -1,5 +1,9 @@ ! Copyright (C) 2008 James Cash ! See http://factorcode.org/license.txt for BSD license. -USING: lisp tools.test ; +USING: lisp lisp.parser tools.test ; -IN: lisp.tests \ No newline at end of file +IN: lisp.test + +{ [ "aoeu" 2 1 T{ lisp-symbol f "foo" } ] } [ + "(foo 1 2 \"aoeu\")" lisp-string>factor +] unit-test \ No newline at end of file diff --git a/extra/lisp/parser/parser-tests.factor b/extra/lisp/parser/parser-tests.factor index 025b45e60d..9e6b54ab0c 100644 --- a/extra/lisp/parser/parser-tests.factor +++ b/extra/lisp/parser/parser-tests.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 James Cash ! See http://factorcode.org/license.txt for BSD license. -USING: lisp.parser tools.test ; +USING: lisp.parser tools.test peg peg.ebnf ; IN: lisp.parser.tests @@ -12,6 +12,10 @@ IN: lisp.parser.tests "123.98" "atom" \ lisp-expr rule parse parse-result-ast ] unit-test +{ "" } [ + "\"\"" "atom" \ lisp-expr rule parse parse-result-ast +] unit-test + { "aoeu" } [ "\"aoeu\"" "atom" \ lisp-expr rule parse parse-result-ast ] unit-test @@ -30,5 +34,5 @@ IN: lisp.parser.tests { T{ s-exp f V{ T{ lisp-symbol f "foo" } 1 2 "aoeu" } } } [ - "(foo 1 2 \"aoeu\")" + "(foo 1 2 \"aoeu\")" lisp-expr parse-result-ast ] unit-test \ No newline at end of file