Commits

Armin Rigo committed 737919f

Fix tests

Comments (0)

Files changed (1)

     assert f(0) == unichr(0)
     assert f(255) == unichr(255)
     assert f(0x1234) == u'\u1234'
-    assert f(-1) == u'\U00012345'
+    if sizeof(BWChar) == 4:
+        assert f(-1) == u'\U00012345'
 
 def test_struct_with_bitfields():
     BLong = new_primitive_type("long")
         s.a1 = u'\ud807\udf44'
         assert s.a1 == u'\U00011f44'
     else:
-        py.test.raises(ValueError, "s.a1 = u'\U00012345'")
+        py.test.raises(TypeError, "s.a1 = u'\U00012345'")
     #
     BWCharArray = new_array_type(BWCharP, None)
     a = newp(BWCharArray, u'hello \u1234 world')