Author: David Schneider <david.schnei...@picle.org>
Branch: 
Changeset: r48:666f9eb82450
Date: 2011-09-27 16:06 +0200
http://bitbucket.org/pypy/lang-io/changeset/666f9eb82450/

Log:    failing tests for message forwarding

diff --git a/io/test/test_object.py b/io/test/test_object.py
--- a/io/test/test_object.py
+++ b/io/test/test_object.py
@@ -318,3 +318,22 @@
     assert res is space.w_nil
     assert space.w_lobby.slots['a'].slots['printed'] is space.w_true
     assert space.w_lobby.slots['b'].slots['printed'] is space.w_true
+
+def test_object_message_forwarding():
+    inp = """
+    a := Object clone do(
+        someValue := 23
+        forward := method(someValue)
+    )
+    a notThere"""
+    res, space = interpret(inp)
+    assert res.number_value == 23
+
+def test_object_forwarding_args():
+    inp = """
+    a := Object clone do(
+        forward := method(call message argAt(0)))
+    )
+    a notThere(46)"""
+    res, space = interpret(inp)
+    assert res.number_value == 46
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to