From 83aa8bc07b8396c90e5796206ba05af8431f1422 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Sun, 26 May 2013 18:28:23 -0700 Subject: [PATCH] Add real test for check-type and remove unit tests. --- .../tests/typed-racket/unit-tests/typecheck-tests.rkt | 6 ------ .../typed-racket/fail/multiple-annotations-define.rkt | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/multiple-annotations-define.rkt diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt index 1e4d539bf3..b8a05abbcf 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -1699,12 +1699,6 @@ [tc-e/t (inst (ann (lambda (a) a) (All (a) (a -> a))) Symbol) (t:-> -Symbol -Symbol)] ) - (test-suite - "check-type tests" - (test-exn "Fails correctly" exn:fail:syntax? (lambda () (parameterize ([orig-module-stx #'here]) - (check-type #'here N B)))) - (test-not-exn "Doesn't fail on subtypes" (lambda () (check-type #'here N Univ))) - (test-not-exn "Doesn't fail on equal types" (lambda () (check-type #'here N N)))) (test-suite "tc-literal tests" (tc-l 5 -PosByte) diff --git a/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/multiple-annotations-define.rkt b/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/multiple-annotations-define.rkt new file mode 100644 index 0000000000..5e6b118082 --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/multiple-annotations-define.rkt @@ -0,0 +1,8 @@ +#; +(exn-pred 1 "Body had type:.*Variable had type:.*") +#lang typed/racket + + +(: a Integer) +(: b String) +(define-values (a b c) (values 1 2 3))