From cfbdcf9cdb33e53c46823c319d05aa46bc1ec302 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Wed, 15 Jun 2011 18:08:56 -0400 Subject: [PATCH] Moved new TR symbol testing into unit tests. original commit: b3262691337e929809d0b4e7e96cd390deb0d501 --- .../unit-tests/typecheck-tests.rkt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt index fbe55655..b6d0d86a 100644 --- a/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt +++ b/collects/tests/typed-scheme/unit-tests/typecheck-tests.rkt @@ -941,6 +941,25 @@ (tc-e (string-locale-ci? "a" "A") B) + ;Symbols + + (tc-e (symbol? 'foo) #:ret (ret B (-FS -top -bot))) + (tc-e (symbol? 2) #:ret (ret B (-FS -bot -top))) + + (tc-e (symbol-interned? 'foo) B) + (tc-e (symbol-interned? (string->unreadable-symbol "bar")) B) + (tc-e (symbol-interned? (string->uninterned-symbol "bar")) B) + (tc-e (symbol-interned? (gensym 'foo)) B) + + (tc-e (symbol-unreadable? (gensym)) B) + (tc-e (symbol-unreadable? 'foo) B) + (tc-e (string->unreadable-symbol "bar") -Symbol) + (tc-e (string->uninterned-symbol "bar") -Symbol) + + (tc-e (symbol->string 'foo) -String) + (tc-e (string->symbol (symbol->string 'foo)) -Symbol) + + ) (test-suite