test fixes
authorStefan Behnel <scoder@users.berlios.de>
Sat, 10 Oct 2009 09:39:28 +0000 (11:39 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 10 Oct 2009 09:39:28 +0000 (11:39 +0200)
tests/run/ct_DEF.pyx
tests/run/type_inference.pyx
tests/run/varargdecl.pyx

index 1f64106e08e0fb604edec9ce59f9e22be91e0f19..a06eccbbd8cc3624a395e5967067ed915cec5187 100644 (file)
@@ -41,7 +41,7 @@ DEF INT2 = 0x42
 DEF INT3 = -0x42
 DEF LONG = 666L
 DEF FLOAT = 12.5
-DEF STR = "spam"
+DEF STR = b"spam"
 DEF TWO = TUPLE[1]
 DEF FIVE = TWO + 3
 DEF TRUE  = TRUE_FALSE[0]
index 1ca2c5d93ae2788fda38ad5b0ef9e860a14e03b6..7f9aa69da46dea6d73a4684d3fe57f19523b204a 100644 (file)
@@ -13,21 +13,23 @@ from cython cimport typeof
 
 def simple():
     i = 3
-    assert typeof(i) == "long"
+    assert typeof(i) == "long", typeof(i)
     x = 1.41
-    assert typeof(x) == "double"
+    assert typeof(x) == "double", typeof(x)
     xptr = &x
-    assert typeof(xptr) == "double *"
+    assert typeof(xptr) == "double *", typeof(xptr)
     xptrptr = &xptr
-    assert typeof(xptrptr) == "double **"
+    assert typeof(xptrptr) == "double **", typeof(xptrptr)
+    b = b"abc"
+    assert typeof(b) == "char *", typeof(b)
     s = "abc"
-    assert typeof(s) == "char *"
+    assert typeof(s) == "Python object", typeof(s)
     u = u"xyz"
-    assert typeof(u) == "unicode object"
+    assert typeof(u) == "unicode object", typeof(u)
     L = [1,2,3]
-    assert typeof(L) == "list object"
+    assert typeof(L) == "list object", typeof(L)
     t = (4,5,6)
-    assert typeof(t) == "tuple object"
+    assert typeof(t) == "tuple object", typeof(t)
 
 def multiple_assignments():
     a = 3
index c59a0d16a40ea6e135a26fcb5280dcb1ba1f3caf..9e624cdfdc2f083adb64a99576ce7c46b2684673 100644 (file)
@@ -6,5 +6,5 @@ cdef grail(char *blarg, ...):
     pass
 
 def test():
-    grail("test")
-    grail("test", "toast")
+    grail(b"test")
+    grail(b"test", b"toast")