Make test-implementation language expose all of `racket` rather than just `racket/base`, for convenience.
This commit is contained in:
parent
f01b17dea4
commit
ee0033b6be
|
@ -1,4 +1,4 @@
|
||||||
#lang racket/base
|
#lang racket
|
||||||
;; Test drivers for Syndicate implementation.
|
;; Test drivers for Syndicate implementation.
|
||||||
|
|
||||||
(provide collected-events
|
(provide collected-events
|
||||||
|
@ -23,15 +23,12 @@
|
||||||
run-syndicate-test!
|
run-syndicate-test!
|
||||||
log-test-result!
|
log-test-result!
|
||||||
|
|
||||||
(all-from-out racket/base)
|
(all-from-out racket)
|
||||||
(all-from-out "main.rkt"))
|
(all-from-out "main.rkt"))
|
||||||
|
|
||||||
(module reader syntax/module-reader imperative-syndicate/test-implementation)
|
(module reader syntax/module-reader imperative-syndicate/test-implementation)
|
||||||
|
|
||||||
(require racket/exn)
|
(require racket/exn)
|
||||||
(require racket/match)
|
|
||||||
(require racket/set)
|
|
||||||
(require (only-in racket/string string-split string-join string-contains?))
|
|
||||||
|
|
||||||
(require "bag.rkt")
|
(require "bag.rkt")
|
||||||
(require "main.rkt")
|
(require "main.rkt")
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
|
|
||||||
(define (only-seen-monitor-assertions?)
|
(define (only-seen-monitor-assertions?)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(define actual-assertions (dataspace-assertions (final-dataspace)))
|
(define actual-assertions (final-assertions))
|
||||||
(define expected-assertions (make-hash (list (cons (observe (capture (discard))) 1))))
|
(define expected-assertions (set (observe (capture (discard)))))
|
||||||
(or (equal? actual-assertions expected-assertions)
|
(or (equal? actual-assertions expected-assertions)
|
||||||
(error 'only-seen-monitor-assertions? "Actual-assertions ~v <> expected-assertions ~v"
|
(error 'only-seen-monitor-assertions? "Actual-assertions ~v <> expected-assertions ~v"
|
||||||
actual-assertions
|
actual-assertions
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
;;
|
;;
|
||||||
;; then the second one will see a literal `(discard)` for `z`!
|
;; then the second one will see a literal `(discard)` for `z`!
|
||||||
|
|
||||||
(require racket/string)
|
|
||||||
|
|
||||||
(assertion-struct researcher (name topic))
|
(assertion-struct researcher (name topic))
|
||||||
|
|
||||||
(define no-mention-of-discard
|
(define no-mention-of-discard
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
(pause)
|
(pause)
|
||||||
(local-require "../../bag.rkt")
|
(local-require "../../bag.rkt")
|
||||||
(for [(a (in-bag (current-adhoc-assertions)))]
|
(for [(a (in-bag (current-adhoc-assertions)))]
|
||||||
(local-require racket/match)
|
|
||||||
(match a
|
(match a
|
||||||
[(entry 'a _) (retract! a)]
|
[(entry 'a _) (retract! a)]
|
||||||
[_ (void)]))
|
[_ (void)]))
|
||||||
|
|
Loading…
Reference in New Issue