From a6bd87b6322f58e3741f86084c1305485e1f44cc Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Thu, 27 May 2010 12:20:16 -0600 Subject: [PATCH] Cyclic zo tests original commit: 612bd22bfe88dcfa27d133c6572a42cff406a6dd --- collects/tests/compiler/zo-exs.rkt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 collects/tests/compiler/zo-exs.rkt diff --git a/collects/tests/compiler/zo-exs.rkt b/collects/tests/compiler/zo-exs.rkt new file mode 100644 index 0000000000..b8ab07e067 --- /dev/null +++ b/collects/tests/compiler/zo-exs.rkt @@ -0,0 +1,22 @@ +#lang racket +(require compiler/zo-parse + compiler/zo-marshal + tests/eli-tester) + +(define (roundtrip ct) + (define bs (zo-marshal ct)) + (test bs + (zo-parse (open-input-bytes bs)) => ct)) + +(test + (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)))