[pypy-commit] pypy reflex-support: test fixes

wlav noreply at buildbot.pypy.org
Thu Jun 30 01:25:14 CEST 2011


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r45189:0b0ab045fbbf
Date: 2011-06-28 11:24 -0700
http://bitbucket.org/pypy/pypy/changeset/0b0ab045fbbf/

Log:	test fixes

diff --git a/pypy/module/cppyy/test/test_helper.py b/pypy/module/cppyy/test/test_helper.py
--- a/pypy/module/cppyy/test/test_helper.py
+++ b/pypy/module/cppyy/test/test_helper.py
@@ -22,18 +22,20 @@
 
 
 def test_operator_mapping():
-    assert helper.map_operator_name("operator[]", 1)  == "__getitem__"
-    assert helper.map_operator_name("operator()", 1)  == "__call__"
-    assert helper.map_operator_name("operator%", 1)   == "__mod__"
-    assert helper.map_operator_name("operator**", 1)  == "__pow__"
-    assert helper.map_operator_name("operator<<", 1)  == "__lshift__"
-    assert helper.map_operator_name("operator|", 1)   == "__or__"
+    assert helper.map_operator_name("operator[]", 1, "const int&")  == "__getitem__"
+    assert helper.map_operator_name("operator[]", 1, "int&")        == "__setitem__"
 
-    assert helper.map_operator_name("operator*", 1) == "__mul__"
-    assert helper.map_operator_name("operator*", 0) == "__deref__"
+    assert helper.map_operator_name("operator()", 1, "")  == "__call__"
+    assert helper.map_operator_name("operator%", 1, "")   == "__mod__"
+    assert helper.map_operator_name("operator**", 1, "")  == "__pow__"
+    assert helper.map_operator_name("operator<<", 1, "")  == "__lshift__"
+    assert helper.map_operator_name("operator|", 1, "")   == "__or__"
 
-    assert helper.map_operator_name("operator+", 1) == "__add__"
-    assert helper.map_operator_name("operator+", 0) == "__pos__"
+    assert helper.map_operator_name("operator*", 1, "") == "__mul__"
+    assert helper.map_operator_name("operator*", 0, "") == "__deref__"
 
-    assert helper.map_operator_name("func", 0)        == "func"
-    assert helper.map_operator_name("some_method", 0) == "some_method"
+    assert helper.map_operator_name("operator+", 1, "") == "__add__"
+    assert helper.map_operator_name("operator+", 0, "") == "__pos__"
+
+    assert helper.map_operator_name("func", 0, "")        == "func"
+    assert helper.map_operator_name("some_method", 0, "") == "some_method"


More information about the pypy-commit mailing list