[prev in list] [next in list] [prev in thread] [next in thread]
List: pypy-svn
Subject: [pypy-commit] cffi default: Add a test that is hopefully passing on all platforms
From: arigo <noreply () buildbot ! pypy ! org>
Date: 2015-05-31 7:46:07
Message-ID: 20150531074607.77B651C11B6 () cobra ! cs ! uni-duesseldorf ! de
[Download RAW message or body]
Author: Armin Rigo <arigo@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
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic