[pypy-commit] lang-smalltalk default: fixed the tests messed up by the last changes

lwassermann noreply at buildbot.pypy.org
Thu May 16 20:25:56 CEST 2013


Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch: 
Changeset: r394:408a13e4f78f
Date: 2013-05-16 20:25 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/408a13e4f78f/

Log:	fixed the tests messed up by the last changes

diff --git a/spyvm/test/test_primitives.py b/spyvm/test/test_primitives.py
--- a/spyvm/test/test_primitives.py
+++ b/spyvm/test/test_primitives.py
@@ -51,7 +51,8 @@
     interp, w_frame, argument_count = mock(stack, context)
     prim_table[code](interp, w_frame.as_context_get_shadow(space), argument_count-1)
     res = w_frame.as_context_get_shadow(space).pop()
-    assert not w_frame.as_context_get_shadow(space).stackdepth() # check args are consumed
+    s_frame = w_frame.as_context_get_shadow(space)
+    assert not s_frame.stackdepth() - s_frame.tempsize() # check args are consumed
     return res
 
 def prim_fails(code, stack):
diff --git a/spyvm/test/test_shadow.py b/spyvm/test/test_shadow.py
--- a/spyvm/test/test_shadow.py
+++ b/spyvm/test/test_shadow.py
@@ -127,7 +127,7 @@
     assert s_object2.gettemp(1) == 'b'
     assert s_object2.gettemp(0) == 'a'
     assert s_object.w_method() == w_m
-    idx = s_object.stackstart()
+    idx = s_object.stackstart() + s_object.tempsize()
     w_object.store(space, idx, space.wrap_string('f'))
     w_object.store(space, idx + 1, space.wrap_string('g'))
     w_object.store(space, idx + 2, space.wrap_string('h'))
@@ -139,7 +139,8 @@
     assert s_object.pop() == 'i'
     assert map(lambda x: x.as_string(), s_object.pop_and_return_n(2)) == ['g', 'h']
     assert s_object.pop().as_string() == 'f'
-    assert s_object.external_stackpointer() == s_object.stackstart()
+    assert s_object.external_stackpointer() == s_object.stackstart() + s_object.tempsize()
+    assert s_object.stackdepth() == s_object.tempsize()
 
 def test_methodcontext():
     w_m = method()


More information about the pypy-commit mailing list