Skip to content

Commit

Permalink
Unbreak tests broken by d701105
Browse files Browse the repository at this point in the history
The indirection for inserting the test expression in the generated
code is needed to prevent an error.
  • Loading branch information
mikesperber committed Sep 10, 2024
1 parent 3af5192 commit eb9a26f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions htdp-lib/test-engine/syntax.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
(syntax-column stx)
(syntax-position stx)
(syntax-span stx)))))
;; without this indirection, we get "reference to a variable that is not exported"
(define test-expr-for-use #`#,test-expr)
(if (eq? 'module (syntax-local-context))
#`(define #,bogus-name
#,(stepper-syntax-property
Expand All @@ -48,7 +50,7 @@
['stepper-use-val-as-final #t])
(quasisyntax/loc stx
(#,checker-proc-stx
(lambda () #,test-expr)
(lambda () #,test-expr-for-use)
#,@embedded-stxes
#,src-info)))))
'stepper-skipto
Expand All @@ -64,7 +66,7 @@
['stepper-use-val-as-final #t])
(quasisyntax/loc stx
(#,checker-proc-stx
(lambda () #,test-expr)
(lambda () #,test-expr-for-use)
#,@embedded-stxes
#,src-info)))))))

Expand Down

0 comments on commit eb9a26f

Please sign in to comment.