diff --git a/hoax/compile-ops.rkt b/hoax/compile-ops.rkt index 8657643..138c4d1 100644 --- a/hoax/compile-ops.rkt +++ b/hoax/compile-ops.rkt @@ -161,6 +161,7 @@ (theend (gensym 'theend))) (seq (Pop r8) (assert-natural r8) + (assert-char rax) ; special case for length = 0 (Cmp r8 0) diff --git a/hoax/test/test-runner.rkt b/hoax/test/test-runner.rkt index 9f1053a..29eff4b 100644 --- a/hoax/test/test-runner.rkt +++ b/hoax/test/test-runner.rkt @@ -143,6 +143,7 @@ (check-equal? (run '"") "") (check-equal? (run '"fred") "fred") (check-equal? (run '"wilma") "wilma") + (check-equal? (run '(make-string 0 #t)) 'err) (check-equal? (run '(make-string 0 #\f)) "") (check-equal? (run '(make-string 3 #\f)) "fff") (check-equal? (run '(make-string 3 #\g)) "ggg") diff --git a/iniquity/compile-ops.rkt b/iniquity/compile-ops.rkt index 8657643..138c4d1 100644 --- a/iniquity/compile-ops.rkt +++ b/iniquity/compile-ops.rkt @@ -161,6 +161,7 @@ (theend (gensym 'theend))) (seq (Pop r8) (assert-natural r8) + (assert-char rax) ; special case for length = 0 (Cmp r8 0) diff --git a/iniquity/test/parse.rkt b/iniquity/test/parse.rkt index fd413ee..ea9197b 100644 --- a/iniquity/test/parse.rkt +++ b/iniquity/test/parse.rkt @@ -47,6 +47,7 @@ (check-equal? (parse "asdf") (p (Lit "asdf"))) (check-equal? (parse '(make-string 10 #\a)) (p (Prim2 'make-string (Lit 10) (Lit #\a))))) + (begin ; Iniquity (check-equal? (parse '(define (f x) x) 1) (Prog (list (Defn 'f '(x) (Var 'x))) (Lit 1))) diff --git a/iniquity/test/test-runner.rkt b/iniquity/test/test-runner.rkt index 6e4acb5..558308f 100644 --- a/iniquity/test/test-runner.rkt +++ b/iniquity/test/test-runner.rkt @@ -143,6 +143,7 @@ (check-equal? (run '"") "") (check-equal? (run '"fred") "fred") (check-equal? (run '"wilma") "wilma") + (check-equal? (run '(make-string 0 #t)) 'err) (check-equal? (run '(make-string 0 #\f)) "") (check-equal? (run '(make-string 3 #\f)) "fff") (check-equal? (run '(make-string 3 #\g)) "ggg") diff --git a/jig/compile-ops.rkt b/jig/compile-ops.rkt index 8657643..138c4d1 100644 --- a/jig/compile-ops.rkt +++ b/jig/compile-ops.rkt @@ -161,6 +161,7 @@ (theend (gensym 'theend))) (seq (Pop r8) (assert-natural r8) + (assert-char rax) ; special case for length = 0 (Cmp r8 0) diff --git a/jig/test/test-runner.rkt b/jig/test/test-runner.rkt index 6e4acb5..558308f 100644 --- a/jig/test/test-runner.rkt +++ b/jig/test/test-runner.rkt @@ -143,6 +143,7 @@ (check-equal? (run '"") "") (check-equal? (run '"fred") "fred") (check-equal? (run '"wilma") "wilma") + (check-equal? (run '(make-string 0 #t)) 'err) (check-equal? (run '(make-string 0 #\f)) "") (check-equal? (run '(make-string 3 #\f)) "fff") (check-equal? (run '(make-string 3 #\g)) "ggg") diff --git a/knock/compile-ops.rkt b/knock/compile-ops.rkt index 8657643..138c4d1 100644 --- a/knock/compile-ops.rkt +++ b/knock/compile-ops.rkt @@ -161,6 +161,7 @@ (theend (gensym 'theend))) (seq (Pop r8) (assert-natural r8) + (assert-char rax) ; special case for length = 0 (Cmp r8 0) diff --git a/knock/test/test-runner.rkt b/knock/test/test-runner.rkt index a7c0fef..68306a3 100644 --- a/knock/test/test-runner.rkt +++ b/knock/test/test-runner.rkt @@ -143,6 +143,7 @@ (check-equal? (run '"") "") (check-equal? (run '"fred") "fred") (check-equal? (run '"wilma") "wilma") + (check-equal? (run '(make-string 0 #t)) 'err) (check-equal? (run '(make-string 0 #\f)) "") (check-equal? (run '(make-string 3 #\f)) "fff") (check-equal? (run '(make-string 3 #\g)) "ggg") diff --git a/loot/compile-ops.rkt b/loot/compile-ops.rkt index 63090ff..14ae7d9 100644 --- a/loot/compile-ops.rkt +++ b/loot/compile-ops.rkt @@ -161,6 +161,7 @@ (theend (gensym 'theend))) (seq (Pop r8) (assert-natural r8) + (assert-char rax) ; special case for length = 0 (Cmp r8 0) diff --git a/loot/test/test-runner.rkt b/loot/test/test-runner.rkt index 9d32fe3..d5ecf65 100644 --- a/loot/test/test-runner.rkt +++ b/loot/test/test-runner.rkt @@ -143,6 +143,7 @@ (check-equal? (run '"") "") (check-equal? (run '"fred") "fred") (check-equal? (run '"wilma") "wilma") + (check-equal? (run '(make-string 0 #t)) 'err) (check-equal? (run '(make-string 0 #\f)) "") (check-equal? (run '(make-string 3 #\f)) "fff") (check-equal? (run '(make-string 3 #\g)) "ggg")