extended test case
authorStefan Behnel <scoder@users.berlios.de>
Fri, 25 Apr 2008 16:34:18 +0000 (18:34 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 25 Apr 2008 16:34:18 +0000 (18:34 +0200)
tests/run/specialfloat.pyx

index 8a4d8d584faedf0c41840b958713de4ba035ee34..5a2524d0e6935cfbe8b5b93b582f1f4c269512e5 100644 (file)
@@ -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
+