add tests to ensure counter examples in buggy versions of stlc-sub aren't
counter examples in stlc-sub-base.rkt
This commit is contained in:
parent
e9e4f396d9
commit
dbd3e04b82
|
@ -1,7 +1,8 @@
|
|||
#lang racket/base
|
||||
(require "stlc-sub-base.rkt"
|
||||
"../stlc/tests-lib.rkt"
|
||||
redex/reduction-semantics)
|
||||
redex/reduction-semantics
|
||||
racket/runtime-path)
|
||||
(stlc-tests uses-bound-var?
|
||||
typeof
|
||||
red
|
||||
|
@ -19,4 +20,13 @@
|
|||
(term (λ (y int) y)))
|
||||
(test-equal (check (term ((λ (x int) x) 1))) #t)
|
||||
(test-equal (check (term (hd ((cons 1) 2)))) #t)
|
||||
|
||||
(define-runtime-path here ".")
|
||||
(for ([f (in-list (directory-list here))])
|
||||
(when (regexp-match #rx"^stlc-sub-[0-9]+[.]rkt$" (path->string f))
|
||||
(define small-counter-example (dynamic-require (build-path here f) 'small-counter-example))
|
||||
(unless (check small-counter-example)
|
||||
(error 'tests.rkt "the counterexample in ~a also fails check for stlc-sub-base.rkt"
|
||||
f))))
|
||||
|
||||
(test-results)
|
||||
|
|
Loading…
Reference in New Issue
Block a user