Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r62419:98b2a64c04e0
Date: 2013-03-18 16:30 -0700
http://bitbucket.org/pypy/pypy/changeset/98b2a64c04e0/
Log: ValueErrors are now ValueErrors instead of TypeErrors
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
@@ -23,6 +23,7 @@
class D {
public:
virtual int check() { return (int)'D'; }
+ virtual int check(int, int) { return (int)'D'; }
void overload() {}
void overload(no_such_class*) {}
void overload(char, int i = 0) {} // Reflex requires a named arg
diff --git a/pypy/module/cppyy/test/test_datatypes.py
b/pypy/module/cppyy/test/test_datatypes.py
--- a/pypy/module/cppyy/test/test_datatypes.py
+++ b/pypy/module/cppyy/test/test_datatypes.py
@@ -127,7 +127,7 @@
c.m_bool = 0; assert c.get_bool() == False
c.set_bool(0); assert c.m_bool == False
- raises(TypeError, 'c.set_bool(10)')
+ raises(ValueError, 'c.set_bool(10)')
# char types through functions
c.set_char('c'); assert c.get_char() == 'c'
@@ -143,10 +143,10 @@
c.set_uchar('e'); assert c.m_uchar == 'e'
c.set_uchar(43); assert c.m_uchar == chr(43)
- raises(TypeError, 'c.set_char("string")')
- raises(TypeError, 'c.set_char(500)')
- raises(TypeError, 'c.set_uchar("string")')
-# TODO: raises(TypeError, 'c.set_uchar(-1)')
+ raises(ValueError, 'c.set_char("string")')
+ raises(ValueError, 'c.set_char(500)')
+ raises(ValueError, 'c.set_uchar("string")')
+ raises(ValueError, 'c.set_uchar(-1)')
# integer types
names = ['short', 'ushort', 'int', 'uint', 'long', 'ulong', 'llong',
'ullong']
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit