bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A passing test case


From: Gregory Marton
Subject: Re: A passing test case
Date: Sat, 26 Jan 2008 09:28:59 -0500 (EST)

The differences are not significant. I guess I wanted to make clear in the test case that this isn't something to do with literal rationals, and I didn't want the test case to be printing things to the console.

Thanks,
Grem

Gregory Marton <address@hidden> writes:

Hi folks,

I just wanted to send in a test case for a bug that is fixed as of
guile 1.8.2, but recently bit me, and it's just not that obvious to
test for.  It is essentially exposed in 1.8.1 by
  (let ((x 1/2))
    (display x)
    (equal? x 1/2))  ===> #f !

Thanks, but why the differences between the code above and the patch
below?  Are they significant?

--- test-suite/tests/fractions.test.1.8.3       2008-01-25 20:08:57.000000000 
-0500
+++ test-suite/tests/fractions.test     2008-01-25 20:09:07.000000000 -0500
@@ -400,3 +400,8 @@
 (with-test-prefix "fraction generics"
   (testeq (G 1) 'integer)
   (testeq (G 2/3) 'fraction))
+
+(pass-if (let ((x (/ 1 2)))
+          (with-output-to-string (lambda () (display x)))
+          (equal? x (/ 1 2))))
+

Regards,
       Neil



--
------ __@   Gregory A. Marton                http://csail.mit.edu/~gremio/
--- _`\<,_                                                                .
-- (*)/ (*)                Let the machine do the dirty work.
~~~~~~~~~~~~~~~~-~~~~~~~~_~~~_~~~~~v~~~~^^^^~~~~~--~~~~~~~~~~~~~~~++~~~~~~~





reply via email to

[Prev in Thread] Current Thread [Next in Thread]