[pypy-commit] lang-smalltalk bitblt: add test for float hashes
timfel
noreply at buildbot.pypy.org
Mon Mar 18 13:59:00 CET 2013
Author: Tim Felgentreff <timfelgentreff at gmail.com>
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()
More information about the pypy-commit
mailing list