extra output on failure for tests/compiler/zo

This commit is contained in:
Matthew Flatt 2015-08-14 07:25:35 -06:00
parent 490b10483a
commit c3d1c9967f

View File

@ -76,7 +76,9 @@
(let ([o (open-output-bytes)]) (let ([o (open-output-bytes)])
(print p o) (print p o)
(get-output-string o)))]) (get-output-string o)))])
(unless (equal? (to-string p) (to-string p2)) (define s1 (to-string p))
(error 'zo "failed on example: ~e" ex-mod)))))))) (define s2 (to-string p2))
(unless (equal? s1 s2)
(error 'zo "failed on example: ~e\n~s\n~s" ex-mod s1 s2))))))))
(for-each check (list ex-mod1 ex-mod2 ex-mod3 ex-mod4 ex-mod5)) (for-each check (list ex-mod1 ex-mod2 ex-mod3 ex-mod4 ex-mod5))