Test for cpp exception handling
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 3 Apr 2009 22:57:01 +0000 (15:57 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 3 Apr 2009 22:57:01 +0000 (15:57 -0700)
tests/compile/cpp_exceptions_T265.pyx [new file with mode: 0644]

diff --git a/tests/compile/cpp_exceptions_T265.pyx b/tests/compile/cpp_exceptions_T265.pyx
new file mode 100644 (file)
index 0000000..3c2bd6d
--- /dev/null
@@ -0,0 +1,12 @@
+cdef void raise_py_error():
+    pass
+
+cdef extern from "foo.h":
+    cdef int generic_error() except +
+    cdef int specified_error() except +MemoryError
+    cdef int dynamic_error() except +raise_py_error
+
+def test_it():
+    generic_error()
+    specified_error()
+    dynamic_error()