[pypy-commit] pypy reflex-support: change test now that unknown*'s are usuable

wlav noreply at buildbot.pypy.org
Wed May 14 19:24:45 CEST 2014


Author: Wim Lavrijsen <WLavrijsen at lbl.gov>
Branch: reflex-support
Changeset: r71509:3fe86f7471af
Date: 2014-05-14 10:23 -0700
http://bitbucket.org/pypy/pypy/changeset/3fe86f7471af/

Log:	change test now that unknown*'s are usuable

diff --git a/pypy/module/cppyy/test/fragile.h b/pypy/module/cppyy/test/fragile.h
--- a/pypy/module/cppyy/test/fragile.h
+++ b/pypy/module/cppyy/test/fragile.h
@@ -17,7 +17,7 @@
 class C {
 public:
     virtual int check() { return (int)'C'; }
-    void use_no_such(no_such_class*) {}
+    long use_no_such(no_such_class* p) { return (long)p; }
 };
 
 class D {
diff --git a/pypy/module/cppyy/test/test_fragile.py b/pypy/module/cppyy/test/test_fragile.py
--- a/pypy/module/cppyy/test/test_fragile.py
+++ b/pypy/module/cppyy/test/test_fragile.py
@@ -55,7 +55,8 @@
 
         assert fragile.C == fragile.C
         assert fragile.C().check() == ord('C')
-        raises(TypeError, fragile.C().use_no_such, None)
+        assert fragile.C().use_no_such(None) == 0
+        assert fragile.C().use_no_such(fragile.B().gime_no_such()) == 0
 
     def test03_arguments(self):
         """Test reporting when providing wrong arguments"""


More information about the pypy-commit mailing list