Commits

Lars Wassermann  committed 408a13e

fixed the tests messed up by the last changes

  • Participants
  • Parent commits 293ebf9

Comments (0)

Files changed (2)

File spyvm/test/test_primitives.py

     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):

File spyvm/test/test_shadow.py

     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'))
     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()