From d650866cdbc12e7de9620f63241ca1fff8b68dfd Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Mon, 8 Sep 2014 18:50:28 -0400 Subject: [PATCH] test types for typed/syntax/stx original commit: 4c22029f0616611c826f10fc2d3320a1ab32d48b --- .../tests/typed-racket/succeed/stx.rkt | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/stx.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/stx.rkt index 2caded38..d89d2bf2 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/stx.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/succeed/stx.rkt @@ -15,14 +15,30 @@ (check-true (stx-list? #'(a b c d))) (check-false (stx-list? #'a)) -(syntax-e (car (stx->list #'(a b c d)))) -(add1 (car (stx->list '(1 2 3)))) +(ann (stx->list #'(a b c d)) (Listof (Syntaxof Symbol))) +(ann (syntax-e (car (stx->list #'(a b c d)))) Symbol) +(ann (stx->list (list #'a #'b)) (Listof (Syntaxof Symbol))) +(ann (stx->list (list 'a 'b)) (Listof Symbol)) +(ann (add1 (car (stx->list '(1 2 3)))) Positive-Index) -(stx-car #'(a b)) -(stx-cdr #'(a b)) +(ann (stx-car #'(a b)) (Syntaxof 'a)) +(ann (stx-cdr #'(a b)) (List (Syntaxof 'b))) -(stx-map (λ: ([id : Identifier]) (free-identifier=? id #'a)) - #'(a b c d)) +(ann (stx-map (λ: ([id : Identifier]) (free-identifier=? id #'a)) + #'(a b c d)) + (Listof Boolean)) +(ann (stx-map (λ: ([id : Symbol]) (symbol=? id 'a)) + '(a b c d)) + (Listof Boolean)) +(ann (stx-map (λ: ([x : (Syntaxof Real)] [y : (Syntaxof Real)]) + (+ (syntax-e x) (syntax-e y))) + #'(1 2 3) + #'(1 2 3)) + (Listof Real)) +(ann (stx-map + + '(1 2 3) + '(1 2 3)) + (Listof Real)) (module-or-top-identifier=? #'a #'b)