From 422b3d105d166eb039c66d38086a091408d49f35 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 8 Feb 2017 08:50:26 -0800 Subject: [PATCH] update lexer test --- beautiful-racket-demo/basic-demo/lexer-test.rkt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/beautiful-racket-demo/basic-demo/lexer-test.rkt b/beautiful-racket-demo/basic-demo/lexer-test.rkt index c0ea029..b782eb2 100644 --- a/beautiful-racket-demo/basic-demo/lexer-test.rkt +++ b/beautiful-racket-demo/basic-demo/lexer-test.rkt @@ -17,19 +17,27 @@ (srcloc 'string #f #f 12 1)))) (check-equal? (lex "print") - (list (srcloc-token "print" + (list (srcloc-token (token "print" "print") (srcloc 'string #f #f 1 5)))) (check-equal? (lex "goto") - (list (srcloc-token "goto" + (list (srcloc-token (token "goto" "goto") (srcloc 'string #f #f 1 4)))) (check-equal? (lex "end") - (list (srcloc-token "end" + (list (srcloc-token (token "end" "end") (srcloc 'string #f #f 1 3)))) (check-equal? (lex "+") - (list (srcloc-token "+" + (list (srcloc-token (token "+" "+") + (srcloc 'string #f #f 1 1)))) +(check-equal? + (lex ";") + (list (srcloc-token (token ";" ";") + (srcloc 'string #f #f 1 1)))) +(check-equal? + (lex ":") + (list (srcloc-token (token ":" ":") (srcloc 'string #f #f 1 1)))) (check-equal? (lex "12")