Author: Tim Felgentreff <[email protected]>
Branch: bitblt
Changeset: r204:417623e21afb
Date: 2013-03-18 13:14 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/417623e21afb/

Log:    add test for float hashes

diff --git a/spyvm/test/test_model.py b/spyvm/test/test_model.py
--- a/spyvm/test/test_model.py
+++ b/spyvm/test/test_model.py
@@ -260,3 +260,9 @@
             assert math.isnan(target.value)
         else:
             assert target.value == f
+
+def test_float_hash():
+    target = model.W_Float(1.1)
+    assert target.gethash() == model.W_Float(1.1).gethash()
+    target.store(space, 0, space.wrap_int(42))
+    assert target.gethash() != model.W_Float(1.1).gethash()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to