From 7ed8bd637f77fc0c9abab2bf149c31d33f08a050 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 25 Dec 2010 09:55:29 +0000 Subject: Add let-over-lambda test case. git-svn-id: http://svn.drobilla.net/resp/resp@350 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- test.sh | 32 +++++++++++++++++++++----------- test/let-over-fn.resp | 7 +++++++ 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 test/let-over-fn.resp diff --git a/test.sh b/test.sh index 09432a7..fa01f80 100755 --- a/test.sh +++ b/test.sh @@ -13,16 +13,26 @@ run() { fi } -run './test/ack.resp' '8189 : Int' -run './test/closure.resp' '6 : Int' -run './test/def.resp' '4 : Int' -run './test/deffn.resp' '3 : Int' -run './test/fac.resp' '720 : Int' -run './test/inlinefn.resp' '2 : Int' -run './test/nest.resp' '8 : Int' -run './test/tup.resp' '5 : Int' -run './test/string.resp' '"Hello, world!" : String' -run './test/let.resp' '5 : Int' -run './test/match.resp' '"Hello, rectangle!" : String' +# Basic lexical sanity +run './test/def.resp' '4 : Int' +run './test/deffn.resp' '3 : Int' +run './test/inlinefn.resp' '2 : Int' +run './test/nest.resp' '8 : Int' + +# Basic data types +run './test/string.resp' '"Hello, world!" : String' +run './test/tup.resp' '5 : Int' + +# Recursive arithmetic functions +run './test/fac.resp' '720 : Int' +run './test/ack.resp' '8189 : Int' + +# Closures +run './test/closure.resp' '6 : Int' +run './test/let-over-fn.resp' '2 : Int' +run './test/let.resp' '5 : Int' + +# Algebraic data types +run './test/match.resp' '"Hello, rectangle!" : String' #run './test/poly.resp' '#t : Bool' diff --git a/test/let-over-fn.resp b/test/let-over-fn.resp new file mode 100644 index 0000000..be3131f --- /dev/null +++ b/test/let-over-fn.resp @@ -0,0 +1,7 @@ +(def inc + (let (x 1) + (fn (y) (+ x y)))) + +(inc 1) + + \ No newline at end of file -- cgit v1.2.1