From: Stefan Behnel Date: Fri, 25 Apr 2008 16:34:18 +0000 (+0200) Subject: extended test case X-Git-Tag: 0.9.6.14~20^2~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf579cac0b4963916ca0db0558c4bc069d641cdc;p=cython.git extended test case --- diff --git a/tests/run/specialfloat.pyx b/tests/run/specialfloat.pyx index 8a4d8d58..5a2524d0 100644 --- a/tests/run/specialfloat.pyx +++ b/tests/run/specialfloat.pyx @@ -6,6 +6,8 @@ __doc__ = """ nan >>> nan2() nan + >>> nan3() + nan >>> float_nan nan @@ -17,6 +19,10 @@ __doc__ = """ inf >>> infp2() == float('inf') True + >>> infp3() + inf + >>> infp3() == float('inf') + True >>> float_infp inf >>> float_infp == float('inf') @@ -30,6 +36,10 @@ __doc__ = """ -inf >>> infn2() == float('-inf') True + >>> infn3() + -inf + >>> infn3() == float('-inf') + True >>> float_infn -inf >>> float_infn == float('-inf') @@ -60,6 +70,11 @@ def nan2(): f = float('nan') return f +def nan3(): + cdef float f + f = FLOAT_NAN + return f + def infp1(): cdef double f f = FLOAT_INFP @@ -70,6 +85,11 @@ def infp2(): f = float('+inf') return f +def infp3(): + cdef float f + f = FLOAT_INFP + return f + def infn1(): cdef double f f = FLOAT_INFN @@ -80,3 +100,8 @@ def infn2(): f = float('-inf') return f +def infn3(): + cdef float f + f = FLOAT_INFN + return f +