Repairing tests
This commit is contained in:
parent
4b84fa1446
commit
ec7157744f
|
@ -14,50 +14,24 @@
|
||||||
|
|
||||||
(define (roundtrip ct)
|
(define (roundtrip ct)
|
||||||
(define bs (zo-marshal ct))
|
(define bs (zo-marshal ct))
|
||||||
(with-output-to-file "compiled/test_rkt.zo" (λ () (write-bytes bs)) #:exists 'replace)
|
|
||||||
(test #:failure-prefix (format "~S" ct)
|
(test #:failure-prefix (format "~S" ct)
|
||||||
(test bs
|
(test bs
|
||||||
(zo-parse (open-input-bytes bs)) => ct
|
(zo-parse (open-input-bytes bs)) => ct
|
||||||
(run-compiled-bytes bs #t)
|
(read-compiled-bytes bs)
|
||||||
(run-compiled-bytes bs #f))))
|
#;(with-output-to-file "compiled/test_rkt.zo" (λ () (write-bytes bs)) #:exists 'replace)
|
||||||
|
#;(run-compiled-bytes bs #t)
|
||||||
|
#;(run-compiled-bytes bs #f))))
|
||||||
|
|
||||||
(define mpi (module-path-index-join #f #f))
|
(define mpi (module-path-index-join #f #f))
|
||||||
|
|
||||||
|
|
||||||
(test
|
(test
|
||||||
#;(roundtrip
|
|
||||||
(compilation-top 0
|
|
||||||
(prefix 0 empty empty)
|
|
||||||
(list 1 (list 2 3) (list 2 3) 4 5)))
|
|
||||||
; XXX This should work, but closures have a field that is gensym'ed
|
|
||||||
|
|
||||||
(roundtrip
|
(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(let* ([ph (make-placeholder #f)]
|
(list 1 (list 2 3) (list 2 3) 4 5)))
|
||||||
[x (application (closure
|
|
||||||
(lam 'name
|
(roundtrip
|
||||||
empty
|
|
||||||
0
|
|
||||||
empty
|
|
||||||
#f
|
|
||||||
#()
|
|
||||||
empty
|
|
||||||
0
|
|
||||||
ph)
|
|
||||||
'name) empty)])
|
|
||||||
(placeholder-set! ph x)
|
|
||||||
(let ([c (make-reader-graph x)])
|
|
||||||
(closure (lam 'name2
|
|
||||||
empty
|
|
||||||
0
|
|
||||||
empty
|
|
||||||
#f
|
|
||||||
#()
|
|
||||||
empty
|
|
||||||
0
|
|
||||||
(seq (list c c))) 'name2)))))
|
|
||||||
#;(roundtrip
|
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(let* ([ph (make-placeholder #f)]
|
(let* ([ph (make-placeholder #f)]
|
||||||
|
@ -108,39 +82,26 @@
|
||||||
(toplevel 0 0 #f #f)
|
(toplevel 0 0 #f #f)
|
||||||
#(racket/language-info get-info #f)
|
#(racket/language-info get-info #f)
|
||||||
#t)))
|
#t)))
|
||||||
#;(roundtrip
|
|
||||||
|
(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(current-directory)))
|
(current-directory)))
|
||||||
|
|
||||||
#;(roundtrip
|
(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(list (current-directory))))
|
(list (current-directory))))
|
||||||
|
|
||||||
#;(roundtrip
|
(roundtrip
|
||||||
(compilation-top
|
(compilation-top
|
||||||
0
|
0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(cons #hash()
|
(cons #hash()
|
||||||
#hash())))
|
#hash())))
|
||||||
|
|
||||||
#;(roundtrip
|
(roundtrip
|
||||||
(compilation-top
|
(compilation-top
|
||||||
0
|
0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
#hash()))
|
#hash())))
|
||||||
|
|
||||||
#;(local [(define (hash-test make-hash-placeholder)
|
|
||||||
(roundtrip
|
|
||||||
(compilation-top 0
|
|
||||||
(prefix 0 empty empty)
|
|
||||||
(local [(define ht-ph (make-placeholder #f))
|
|
||||||
(define ht (make-hash-placeholder (list (cons 'g ht-ph))))]
|
|
||||||
(placeholder-set! ht-ph ht)
|
|
||||||
(make-reader-graph ht)))))]
|
|
||||||
(hash-test make-hash-placeholder)
|
|
||||||
(hash-test make-hasheq-placeholder)
|
|
||||||
(hash-test make-hasheqv-placeholder)))
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user