new error test case for string to int conversion
authorStefan Behnel <scoder@users.berlios.de>
Sun, 26 Oct 2008 16:59:17 +0000 (17:59 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 26 Oct 2008 16:59:17 +0000 (17:59 +0100)
tests/errors/e_strcoerce.pyx [new file with mode: 0644]

diff --git a/tests/errors/e_strcoerce.pyx b/tests/errors/e_strcoerce.pyx
new file mode 100644 (file)
index 0000000..c8a508a
--- /dev/null
@@ -0,0 +1,8 @@
+cdef int c1 = "t"     # works
+cdef int c2 = "te"    # fails
+cdef int cx = "test"  # fails
+
+_ERRORS = """
+2:14: Only coerce single-character ascii strings can be used as ints.
+3:14: Only coerce single-character ascii strings can be used as ints.
+"""