From 1b9911c50bf15a6aba289d33740735c1a96d13ce Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 15 Dec 2014 09:03:23 -0700 Subject: [PATCH] repair a test The test tried to detect separate evaluations by using the result of `(current-inexact-milliseconds)`, but a clock's resolution might not be high enough. Use `(gensym)`, instead. --- pkgs/racket-test-core/tests/racket/stx.rktl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-test-core/tests/racket/stx.rktl b/pkgs/racket-test-core/tests/racket/stx.rktl index 3e21b2c140..620f1c7d1e 100644 --- a/pkgs/racket-test-core/tests/racket/stx.rktl +++ b/pkgs/racket-test-core/tests/racket/stx.rktl @@ -1171,7 +1171,7 @@ (define-for-syntax ht (make-hash)) (define-syntax (m stx) (or (hash-ref ht (syntax-local-lift-context) #f) - (let ([id (syntax-local-lift-expression #`(quote #,(current-inexact-milliseconds)))]) + (let ([id (syntax-local-lift-expression #`(quote #,(gensym)))]) (hash-set! ht (syntax-local-lift-context) id) id)))) (dynamic-require ''example-that-uses-the-lift-context 0) @@ -1187,7 +1187,7 @@ (dynamic-require ''extra-module 0) (let ([ns (module->namespace ''extra-module)]) (test (eval 'm ns) eval 'm ns) - (test #f = (eval 'm) (eval 'm ns)))))]) + (test #f eq? (eval 'm) (eval 'm ns)))))]) (go) (go) (go))