existing lazy stepper tests passing
in tests/stepper/ test-engine.rkt - add racket/private/promise to test-namespace using namespace-attach-module automatic-tests.rkt - add lazy tests through-tests.rkt - fix existing lazy tests lazy1, lazy2, lazy3 language-level-model.rkt - fix lazy ll-model in stepper/private/model-settings.rkt - edit settings for lazy racket
This commit is contained in:
parent
6921960c5e
commit
c41123ce6c
|
@ -97,14 +97,15 @@
|
|||
#t))
|
||||
|
||||
(define fake-lazy-render-settings
|
||||
(make-render-settings (booleans-as-true/false)
|
||||
(constructor-style-printing)
|
||||
(abbreviate-cons-as-list)
|
||||
print-convert
|
||||
#f
|
||||
#t
|
||||
#f
|
||||
#f))
|
||||
(make-render-settings (booleans-as-true/false) ; true-false-printed?
|
||||
(constructor-style-printing) ; constructor-style-printing?
|
||||
(abbreviate-cons-as-list) ; abbreviate-cons-as-list?
|
||||
(make-fake-render-to-sexp #t #t #t) ; render-to-sexp
|
||||
#f ; lifting?
|
||||
#t ; show-and/or-clauses-consumed?
|
||||
#f ; all-bindings-mutable?
|
||||
#f)) ; show-lambdas-as-lambdas?
|
||||
|
||||
|
||||
(define-struct test-struct () (make-inspector))
|
||||
|
||||
|
|
|
@ -227,7 +227,8 @@
|
|||
|
||||
; sends a step to the stepper, except if
|
||||
; - lhs = rhs
|
||||
; - lhs = ellipses, rhs = last-rhs
|
||||
; - lhs = ellipses, last-rhs-exps = null (ie, this is first step)
|
||||
; - lhs = ellipses, rhs = last-rhs-exps
|
||||
(define (send-step lhs-exps lhs-finished-exps
|
||||
rhs-exps rhs-finished-exps
|
||||
step-kind lhs-posn-info rhs-posn-info)
|
||||
|
@ -238,7 +239,8 @@
|
|||
(unless (or (and (step=? lhs-exps rhs-exps)
|
||||
(when DEBUG (printf "LHS = RHS, so skipping\n")))
|
||||
(and (step=? lhs-exps (list #'(... ...)))
|
||||
(step=? rhs-exps last-rhs-exps)
|
||||
(or (step=? rhs-exps last-rhs-exps)
|
||||
(null? last-rhs-exps))
|
||||
(when DEBUG
|
||||
(printf "LHS = ..., RHS = last RHS, so skipping\n"))))
|
||||
(receive-result
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
(require "through-tests.ss"
|
||||
"test-engine.ss")
|
||||
|
||||
(define lazy-tests '(lazy1 lazy2 lazy3))
|
||||
|
||||
(let ((outer-namespace (current-namespace)))
|
||||
(parameterize ([display-only-errors #t]
|
||||
;; display-only-errors is insufficient, because the evals
|
||||
|
@ -12,7 +14,10 @@
|
|||
;; make sure the tests' print-convert sees the teaching languages' properties
|
||||
#;(namespace-attach-module outer-namespace 'mzlib/pconvert-prop (current-namespace))
|
||||
(namespace-require 'test-engine/racket-tests)
|
||||
(if (run-all-tests-except '(bad-and bad-cons check-error begin-let-bug prims qq-splice time set! local-set! lazy1 lazy2 lazy3
|
||||
local-struct/i local-struct/ilam))
|
||||
(if (and (run-all-tests-except
|
||||
(append '(bad-and bad-cons check-error begin-let-bug prims qq-splice time
|
||||
set! local-set! local-struct/i local-struct/ilam)
|
||||
lazy-tests))
|
||||
(run-tests lazy-tests))
|
||||
(exit 0)
|
||||
(exit 1))))
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
(make-ll-model `(lib "htdp-advanced.ss" "lang") fake-advanced-render-settings #t))
|
||||
|
||||
(define lazy
|
||||
(make-ll-model `(lib "lazy.ss" "lazy") fake-lazy-render-settings #f))
|
||||
(make-ll-model `(lib "lazy.rkt" "lazy") fake-lazy-render-settings #f))
|
||||
|
||||
|
||||
;; unsure about the render-settings, here:
|
||||
|
|
|
@ -180,6 +180,9 @@
|
|||
(namespace-attach-module (namespace-anchor->empty-namespace n-anchor)
|
||||
'mzlib/pconvert-prop
|
||||
test-namespace)
|
||||
(namespace-attach-module (namespace-anchor->empty-namespace n-anchor)
|
||||
'racket/private/promise
|
||||
test-namespace)
|
||||
(parameterize ([current-namespace test-namespace])
|
||||
(namespace-require 'test-engine/racket-tests)
|
||||
;; make the test engine happy by adding a binding for test~object:
|
||||
|
|
|
@ -1449,10 +1449,7 @@
|
|||
|
||||
(t 'lazy1 m:lazy
|
||||
(! (+ 3 4))
|
||||
:: 3 -> 3
|
||||
:: 3 -> 3
|
||||
:: 3 -> 3
|
||||
:: {(! (+ 3 4))} -> {7})
|
||||
:: {(force (+ 3 4))} -> {(+ 3 4)} -> {7})
|
||||
|
||||
(t 'lazy2 m:lazy
|
||||
(+ (+ 3 4) 5)
|
||||
|
|
Loading…
Reference in New Issue
Block a user