[pypy-svn] r66815 - pypy/branch/io-lang/pypy/lang/io/test

david at codespeak.net david at codespeak.net
Thu Aug 13 22:22:49 CEST 2009


Author: david
Date: Thu Aug 13 22:22:49 2009
New Revision: 66815

Modified:
   pypy/branch/io-lang/pypy/lang/io/test/test_method.py
Log:
test fixes

Modified: pypy/branch/io-lang/pypy/lang/io/test/test_method.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/test/test_method.py	(original)
+++ pypy/branch/io-lang/pypy/lang/io/test/test_method.py	Thu Aug 13 22:22:49 2009
@@ -45,7 +45,8 @@
     inp = 'Block'
     res,space = interpret(inp)
     assert isinstance(res, W_Block)
-    assert res.protos == [space.w_object]
+    assert len(res.protos) == 1
+    assert res.protos[0] is space.w_object
     
 def test_call_on_method():
     inp = 'a := method(x, x + 1); getSlot("a") call(3)'
@@ -103,4 +104,13 @@
     res, space = interpret(inp)
     assert space.w_object.slots['inlineMethod'] is not None
     assert res.value == 4
-    
\ No newline at end of file
+    
+    
+def test_resolution_order():
+    inp = """id := method(a, a)
+    test := method(name, getSlot("self") setSlot(3 + name, 33))
+    test(7)
+    """
+    res, space = interpret(inp)
+    assert res.value == 33
+    assert space.w_lobby.slots[10].value == 33
\ No newline at end of file



More information about the Pypy-commit mailing list