[pypy-svn] r48076 - pypy/dist/pypy/lang/smalltalk/test

lukas at codespeak.net lukas at codespeak.net
Fri Oct 26 17:13:17 CEST 2007


Author: lukas
Date: Fri Oct 26 17:13:15 2007
New Revision: 48076

Modified:
   pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py
Log:
added tests for #// and #\\ bytecodes


Modified: pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/test/test_interpreter.py	Fri Oct 26 17:13:15 2007
@@ -276,6 +276,22 @@
     interp.step()
     interp.step()
     assert interp.w_active_context.stack[0].value == -2
+    
+def test_bytecodePrimDiv():
+    interp = new_interpreter(pushConstantTwoBytecode + pushConstantMinusOneBytecode + bytecodePrimDiv)
+    interp.step()
+    interp.step()
+    interp.step()
+    assert interp.w_active_context.stack[0].value == -2
+
+def test_bytecodePrimMod():
+    interp = new_interpreter(pushConstantTwoBytecode + pushConstantMinusOneBytecode + bytecodePrimMod)
+    interp.step()
+    interp.step()
+    interp.step()
+    assert interp.w_active_context.stack[0].value == 0
+
+
 
 # w_class - the class from which the method is going to be called
 # (and on which it is going to be installed)



More information about the Pypy-commit mailing list