summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorLawrence D'Anna <lawrence_danna@apple.com>2020-07-09 18:39:23 -0700
committerLawrence D'Anna <lawrence_danna@apple.com>2020-07-09 18:39:23 -0700
commit6e2ce7bdd4741ed2df55ad5c7480a8ef0224f815 (patch)
tree76abfcbac3efe19615aa8d7197fcf7e411a44e0d /testing
parent6684336eafc9aafebbccb8f48c3b82cc913b3aa8 (diff)
downloadcffi-6e2ce7bdd4741ed2df55ad5c7480a8ef0224f815.tar.gz
on darwin, arm64 bitfields act like x86_64
Diffstat (limited to 'testing')
-rw-r--r--testing/cffi0/test_ffi_backend.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/testing/cffi0/test_ffi_backend.py b/testing/cffi0/test_ffi_backend.py
index 6937a79..3552196 100644
--- a/testing/cffi0/test_ffi_backend.py
+++ b/testing/cffi0/test_ffi_backend.py
@@ -246,7 +246,10 @@ class TestBitfield:
self.check("int a:2; short b:15; char c:2; char y;", 5, 4, 8)
self.check("int a:2; char b:1; char c:1; char y;", 1, 4, 4)
- @pytest.mark.skipif("platform.machine().startswith(('arm', 'aarch64'))")
+ @pytest.mark.skipif(
+ "not (sys.platform == 'darwin' and platform.machine() == 'arm64')"
+ " and "
+ "platform.machine().startswith(('arm', 'aarch64'))")
def test_bitfield_anonymous_no_align(self):
L = FFI().alignof("long long")
self.check("char y; int :1;", 0, 1, 2)
@@ -260,6 +263,8 @@ class TestBitfield:
self.check("char x; long long :57; char y;", L + 8, 1, L + 9)
@pytest.mark.skipif(
+ "(sys.platform == 'darwin' and platform.machine() == 'arm64')"
+ " or "
"not platform.machine().startswith(('arm', 'aarch64'))")
def test_bitfield_anonymous_align_arm(self):
L = FFI().alignof("long long")
@@ -273,7 +278,10 @@ class TestBitfield:
self.check("char x; long long z:57; char y;", L + 8, L, L + 8 + L)
self.check("char x; long long :57; char y;", L + 8, L, L + 8 + L)
- @pytest.mark.skipif("platform.machine().startswith(('arm', 'aarch64'))")
+ @pytest.mark.skipif(
+ "not (sys.platform == 'darwin' and platform.machine() == 'arm64')"
+ " and "
+ "platform.machine().startswith(('arm', 'aarch64'))")
def test_bitfield_zero(self):
L = FFI().alignof("long long")
self.check("char y; int :0;", 0, 1, 4)
@@ -285,6 +293,8 @@ class TestBitfield:
self.check("int a:1; int :0; int b:1; char y;", 5, 4, 8)
@pytest.mark.skipif(
+ "(sys.platform == 'darwin' and platform.machine() == 'arm64')"
+ " or "
"not platform.machine().startswith(('arm', 'aarch64'))")
def test_bitfield_zero_arm(self):
L = FFI().alignof("long long")