diff --git a/beautiful-racket-demo/bf-demo/parser-tester.rkt b/beautiful-racket-demo/bf-demo/parser-tester.rkt index 8efe497..e2b2e52 100644 --- a/beautiful-racket-demo/bf-demo/parser-tester.rkt +++ b/beautiful-racket-demo/bf-demo/parser-tester.rkt @@ -1,42 +1,3 @@ #lang br (require "parser.rkt") -(module+ test - (require rackunit) - (check-equal? (parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.") - '(bf-program - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-loop - "[" - (bf-op ">") - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-op "-") - (bf-op "+") - (bf-op "+") - (bf-op "<") - (bf-op "-") - "]") - (bf-op ">") - (bf-op ".")))) +(parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.") diff --git a/beautiful-racket-demo/bf-demo/test-parser.rkt b/beautiful-racket-demo/bf-demo/test-parser.rkt new file mode 100644 index 0000000..8efe497 --- /dev/null +++ b/beautiful-racket-demo/bf-demo/test-parser.rkt @@ -0,0 +1,42 @@ +#lang br +(require "parser.rkt") +(module+ test + (require rackunit) + (check-equal? (parse-to-datum "++++-+++-++-++[>++++-+++-++-++<-]>.") + '(bf-program + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-loop + "[" + (bf-op ">") + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-op "-") + (bf-op "+") + (bf-op "+") + (bf-op "<") + (bf-op "-") + "]") + (bf-op ">") + (bf-op "."))))