Skip to content
Snippets Groups Projects
Commit 37798e4b authored by pfdietz's avatar pfdietz
Browse files

Add check that the printing of unreadable objects doesn't change due

to an inopportune GC during the test, in lisps where the gc can move
an object and change what is printed.
parent f7f7c5c8
No related branches found
No related tags found
No related merge requests found
......@@ -401,10 +401,12 @@
(deftest format.b.21
(let ((fn (formatter "~:@b")))
(loop for x in *mini-universe*
for s1 = (format nil "~@:B" x)
for s2 = (let ((*print-base* 2)) (format nil "~A" x))
for s1 = (let ((*print-base* 2)) (format nil "~A" x))
for s2 = (format nil "~@:B" x)
for s3 = (formatter-call-to-string fn x)
unless (or (integerp x) (and (string= s1 s2) (string= s1 s3)))
for s4 = (let ((*print-base* 2)) (format nil "~A" x))
unless (or (integerp x) (and (string= s1 s2) (string= s1 s3))
(string/= s1 s4))
collect (list x s1 s2 s3)))
nil)
......
......@@ -438,9 +438,10 @@
(deftest format.d.21
(loop for x in *mini-universe*
for s1 = (format nil "~@:d" x)
for s2 = (format nil "~A" x)
unless (or (integerp x) (string= s1 s2))
for s1 = (format nil "~A" x)
for s2 = (format nil "~@:d" x)
for s3 = (format nil "~A" x)
unless (or (integerp x) (string= s1 s2) (not (string= s1 s3)))
collect (list x s1 s2))
nil)
......
......@@ -404,10 +404,12 @@
(deftest format.o.21
(let ((fn (formatter "~:@o")))
(loop for x in *mini-universe*
for s1 = (format nil "~@:o" x)
for s2 = (let ((*print-base* 8)) (format nil "~A" x))
for s1 = (let ((*print-base* 8)) (format nil "~A" x))
for s2 = (format nil "~@:o" x)
for s3 = (formatter-call-to-string fn x)
unless (or (integerp x) (and (string= s1 s2) (string= s2 s3)))
for s4 = (let ((*print-base* 8)) (format nil "~A" x))
unless (or (integerp x) (and (string= s1 s2) (string= s2 s3))
(string/= s1 s4))
collect (list x s1 s2 s3)))
nil)
......
......@@ -407,10 +407,13 @@
(deftest format.x.21
(let ((fn (formatter "~:@x")))
(loop for x in *mini-universe*
for s1 = (format nil "~@:x" x)
for s2 = (let ((*print-base* 16)) (format nil "~A" x))
for s1 = (let ((*print-base* 16)) (format nil "~A" x))
for s2 = (format nil "~@:x" x)
for s3 = (formatter-call-to-string fn x)
unless (or (integerp x) (and (string= s1 s2) (string= s2 s3)))
for s4 = (let ((*print-base* 16)) (format nil "~A" x))
unless (or (string/= s1 s4)
(integerp x)
(and (string= s1 s2) (string= s2 s3)))
collect (list x s1 s2 s3)))
nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment