From: Robert Bradshaw Date: Sat, 28 Mar 2009 20:47:03 +0000 (-0700) Subject: test for #183 X-Git-Tag: 0.12.alpha0~334^2~2^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=02e4e0a4c73ff56b650e51d9f0fe3f4e1570786c;p=cython.git test for #183 --- diff --git a/tests/run/cdef_decorator_directives_T183.pyx b/tests/run/cdef_decorator_directives_T183.pyx new file mode 100644 index 00000000..e3713534 --- /dev/null +++ b/tests/run/cdef_decorator_directives_T183.pyx @@ -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