Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 92fca98

Browse files
committed
Fix sdl2-image tests
1 parent f7bf2d7 commit 92fca98

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

tests/BinaryCompatibilityTestCase.php

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,10 @@ public function testDarwinBinaryCompatibility(Version $version): void
5656
$this->markTestSkipped('sdl2_image not installed');
5757
}
5858

59-
$headers = (string)SDL2Image::create($version);
60-
61-
try {
62-
\FFI::cdef($headers, Locator::resolve('libSDL2_image-2.0.0.dylib'));
63-
} catch (\FFI\ParserException $e) {
64-
$this->dumpExceptionInfo($e, $headers);
65-
66-
throw $e;
67-
}
59+
$this->assertHeadersCompatibleWith(
60+
SDL2Image::create($version),
61+
Locator::resolve('libSDL2_image-2.0.0.dylib')
62+
);
6863
}
6964

7065
/**
@@ -78,14 +73,9 @@ public function testLinuxBinaryCompatibility(Version $version): void
7873
$this->markTestSkipped('sdl2_image not installed');
7974
}
8075

81-
$headers = (string)SDL2Image::create($version);
82-
83-
try {
84-
\FFI::cdef($headers, Locator::resolve('libSDL2_image-2.0.so.0'));
85-
} catch (\FFI\ParserException $e) {
86-
$this->dumpExceptionInfo($e, $headers);
87-
88-
throw $e;
89-
}
76+
$this->assertHeadersCompatibleWith(
77+
SDL2Image::create($version),
78+
Locator::resolve('libSDL2_image-2.0.so.0')
79+
);
9080
}
9181
}

0 commit comments

Comments
 (0)