From 23d776fd7c80370bfb4197f87bcf30da00df72a5 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 19 Mar 2016 23:43:50 -0400 Subject: [PATCH] [test] more function/curry tests --- .travis.yml | 2 +- test/define-fail.rkt | 2 +- test/function-pass.rkt | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6244670..bd75904 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ before_install: - cat ../travis-racket/install-racket.sh | bash - export PATH="${RACKET_DIR}/bin:${PATH}" -install: raco pkg install --deps search-auto $TRAVIS_BUILD_DIR +install: raco pkg install --deps search-auto $TRAVIS_BUILD_DIR/trivial before_script: - psql -c 'create database travis_ci_test;' -U postgres diff --git a/test/define-fail.rkt b/test/define-fail.rkt index 15300bb..eb480cf 100644 --- a/test/define-fail.rkt +++ b/test/define-fail.rkt @@ -15,7 +15,7 @@ ) (test-compile-error #:require trivial/define trivial/function trivial/format - #:exn exn:fail? ;;#rx"Type Checker" + #:exn #rx"Type Checker|lambda:" ;; TODO (let: ([f (lambda ([x : String] [y : Integer]) ;; Error here -- swapped y and x diff --git a/test/function-pass.rkt b/test/function-pass.rkt index a31e878..4d73157 100644 --- a/test/function-pass.rkt +++ b/test/function-pass.rkt @@ -19,7 +19,15 @@ 2) (check-true - (begin (curry: (lambda ([x : Integer]) x)) #t)) + (begin + (curry: (lambda ([x : Integer]) x)) + (curry: (lambda ([x : String]) x)) + (curry: (lambda ([x : Any]) x)) + ((curry: (lambda (x) x)) 1) + ((curry: (lambda ([x : (Listof Any)]) x)) '()) + (curry: (lambda ([x : (Listof Boolean)]) x)) + (curry: (lambda ([x : (Vectorof (Listof Boolean))]) x)) + #t)) (check-equal? ((curry: (lambda ([x : Integer]) x)) 3)