cpp_bool test (failing)
authorRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 19:53:25 +0000 (12:53 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Wed, 11 Aug 2010 19:53:25 +0000 (12:53 -0700)
tests/bugs.txt
tests/run/cpp_bool.pyx [new file with mode: 0644]

index 97283827bb29f391214ea6a199dd9545dcccedbf..cb56af8b547183d05428e0298f9f129ac7a044b9 100644 (file)
@@ -16,6 +16,7 @@ with_statement_module_level_T536
 function_as_method_T494
 closure_inside_cdef_T554
 ipow_crash_T562
+cpp_bool
 
 # CPython regression tests that don't current work:
 pyregr.test_threadsignals
diff --git a/tests/run/cpp_bool.pyx b/tests/run/cpp_bool.pyx
new file mode 100644 (file)
index 0000000..14a7b81
--- /dev/null
@@ -0,0 +1,18 @@
+from libcpp cimport bool
+
+def test_bool(bool a):
+    """
+    >>> test_bool(True)
+    True
+    >>> test_bool(1)
+    True
+    >>> test_bool(0)
+    False
+    >>> test_bool(100)
+    True
+    >>> test_bool(None)
+    False
+    >>> test_bool([])
+    False
+    """
+    return a