summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Rivera <stefano@rivera.za.net>2014-01-22 13:06:42 +0200
committerStefano Rivera <stefano@rivera.za.net>2014-01-22 13:06:42 +0200
commit52524b6403f394866dd9798b198f684c512f4bfe (patch)
tree6e3a4f444a4ee99c3848cdf927d61806512c18de
parent94389edc49301d3710286a9c7a599383c1a4e7ec (diff)
downloadcffi-52524b6403f394866dd9798b198f684c512f4bfe.tar.gz
wchar_t is 4 byte, signed on arm64
-rw-r--r--testing/backend_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/testing/backend_tests.py b/testing/backend_tests.py
index ff5dd50..59f361d 100644
--- a/testing/backend_tests.py
+++ b/testing/backend_tests.py
@@ -1,4 +1,5 @@
import py
+import platform
import sys, ctypes
from cffi import FFI, CDefError
from testing.support import *
@@ -755,6 +756,8 @@ class BackendTests:
p = ffi.cast("long long", ffi.cast("wchar_t", -1))
if SIZE_OF_WCHAR == 2: # 2 bytes, unsigned
assert int(p) == 0xffff
+ elif platform.machine() == 'aarch64': # 4 bytes, unsigned
+ assert int(p) == 0xffffffff
else: # 4 bytes, signed
assert int(p) == -1
p = ffi.cast("int", u+'\u1234')