From bf579cac0b4963916ca0db0558c4bc069d641cdc Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 25 Apr 2008 18:34:18 +0200 Subject: [PATCH] extended test case --- tests/run/specialfloat.pyx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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 + -- 2.26.2