diff --git a/abscond/correct.rkt b/abscond/correct.rkt new file mode 100644 index 0000000..bbbacf9 --- /dev/null +++ b/abscond/correct.rkt @@ -0,0 +1,11 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp.rkt") +(require "exec.rkt") + +;; Expr -> Void +(define (check-compiler e) + (check-equal? (interp e) + (exec e))) + diff --git a/blackmail/correct.rkt b/blackmail/correct.rkt new file mode 100644 index 0000000..bbbacf9 --- /dev/null +++ b/blackmail/correct.rkt @@ -0,0 +1,11 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp.rkt") +(require "exec.rkt") + +;; Expr -> Void +(define (check-compiler e) + (check-equal? (interp e) + (exec e))) + diff --git a/con/correct.rkt b/con/correct.rkt new file mode 100644 index 0000000..bbbacf9 --- /dev/null +++ b/con/correct.rkt @@ -0,0 +1,11 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp.rkt") +(require "exec.rkt") + +;; Expr -> Void +(define (check-compiler e) + (check-equal? (interp e) + (exec e))) + diff --git a/dodger/correct.rkt b/dodger/correct.rkt new file mode 100644 index 0000000..ae6e1ae --- /dev/null +++ b/dodger/correct.rkt @@ -0,0 +1,13 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp.rkt") +(require "exec.rkt") + +;; Expr -> Void +(define (check-compiler e) + (let ((r (with-handlers ([exn:fail? identity]) + (interp e)))) + (unless (exn? r) + (check-equal? r (exec e))))) + diff --git a/dupe/correct.rkt b/dupe/correct.rkt index 6e0d7d0..ae6e1ae 100644 --- a/dupe/correct.rkt +++ b/dupe/correct.rkt @@ -1,12 +1,13 @@ #lang racket -(provide (all-defined-out)) -(require rackunit - "interp.rkt" - "compile.rkt" - "types.rkt" - a86/interp) +(provide check-compiler) +(require rackunit) +(require "interp.rkt") +(require "exec.rkt") + +;; Expr -> Void +(define (check-compiler e) + (let ((r (with-handlers ([exn:fail? identity]) + (interp e)))) + (unless (exn? r) + (check-equal? r (exec e))))) -(define (check-correctness e) - (with-handlers ([exn:fail? void]) - (check-eqv? (interp e) - (bits->value (asm-interp (compile e)))))) diff --git a/evildoer/correct.rkt b/evildoer/correct.rkt new file mode 100644 index 0000000..160facd --- /dev/null +++ b/evildoer/correct.rkt @@ -0,0 +1,12 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; Expr String -> Void +(define (check-compiler e i) + (let ((r (with-handlers ([exn:fail? identity]) + (interp/io e i)))) + (unless (exn? r) + (check-equal? r (exec/io e i))))) + diff --git a/extort/correct.rkt b/extort/correct.rkt new file mode 100644 index 0000000..7e672ac --- /dev/null +++ b/extort/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; Expr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/fraud/correct.rkt b/fraud/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/fraud/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/hoax/correct.rkt b/hoax/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/hoax/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/hustle/correct.rkt b/hustle/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/hustle/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/iniquity/correct.rkt b/iniquity/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/iniquity/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/jig/correct.rkt b/jig/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/jig/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/knock/correct.rkt b/knock/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/knock/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) + diff --git a/loot/correct.rkt b/loot/correct.rkt new file mode 100644 index 0000000..df76199 --- /dev/null +++ b/loot/correct.rkt @@ -0,0 +1,10 @@ +#lang racket +(provide check-compiler) +(require rackunit) +(require "interp-io.rkt") +(require "exec-io.rkt") +;; ClosedExpr String -> Void +(define (check-compiler e i) + (check-equal? (interp/io e i) + (exec/io e i))) +