test for #183
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 20:47:03 +0000 (13:47 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 28 Mar 2009 20:47:03 +0000 (13:47 -0700)
tests/run/cdef_decorator_directives_T183.pyx [new file with mode: 0644]

diff --git a/tests/run/cdef_decorator_directives_T183.pyx b/tests/run/cdef_decorator_directives_T183.pyx
new file mode 100644 (file)
index 0000000..e371353
--- /dev/null
@@ -0,0 +1,16 @@
+__doc__ = u"""
+    >>> cdiv_decorator(-12, 5)
+    -2
+    >>> pydiv_decorator(-12, 5)
+    -3
+"""
+
+cimport cython
+
+@cython.cdivision(True)
+cpdef cdiv_decorator(int a, int b):
+    return a / b
+
+@cython.cdivision(False)
+cpdef pydiv_decorator(int a, int b):
+    return a / b