[pypy-commit] cffi default: Add a test that is hopefully passing on all platforms
arigo
noreply at buildbot.pypy.org
Sun May 31 09:46:07 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2142:bdc608220af4
Date: 2015-05-31 09:24 +0200
http://bitbucket.org/cffi/cffi/changeset/bdc608220af4/
Log: Add a test that is hopefully passing on all platforms
diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -992,3 +992,13 @@
ffi.typeof('function_t*')
lib.function(ffi.NULL)
# assert did not crash
+
+def test_alignment_of_longlong():
+ ffi = FFI()
+ x1 = ffi.alignof('unsigned long long')
+ assert x1 in [4, 8]
+ ffi.cdef("struct foo_s { unsigned long long x; };")
+ lib = verify(ffi, 'test_alignment_of_longlong',
+ "struct foo_s { unsigned long long x; };")
+ assert ffi.alignof('unsigned long long') == x1
+ assert ffi.alignof('struct foo_s') == x1
More information about the pypy-commit
mailing list