[pypy-svn] r47810 - pypy/dist/pypy/lang/smalltalk/test
niko at codespeak.net
niko at codespeak.net
Wed Oct 24 12:04:47 CEST 2007
Author: niko
Date: Wed Oct 24 12:04:47 2007
New Revision: 47810
Modified:
pypy/dist/pypy/lang/smalltalk/test/test_primitives.py
Log:
um, make test_string_at_put actually *test* STRING_AT_PUT, rather
than comparing expected values against themselves.
Modified: pypy/dist/pypy/lang/smalltalk/test/test_primitives.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/test/test_primitives.py (original)
+++ pypy/dist/pypy/lang/smalltalk/test/test_primitives.py Wed Oct 24 12:04:47 2007
@@ -73,10 +73,11 @@
assert prim(p.STRING_AT, ["foobar", 3]) == wrap("b")
def test_string_at_put():
- assert prim(p.STRING_AT_PUT, ["foobar", 3, "c"]) == wrap("c")
+ test_str = wrap("foobar")
+ assert prim(p.STRING_AT_PUT, [test_str, 3, "c"]) == wrap("c")
exp = "foocar"
- for i in range(6):
- assert prim(p.STRING_AT, [exp, i]) == wrap(exp[i])
+ for i in range(len(exp)):
+ assert prim(p.STRING_AT, [test_str, i]) == wrap(exp[i])
def test_boolean():
assert prim(p.LESSTHAN, [1,2]) == fimg.w_true
More information about the Pypy-commit
mailing list