Skip to content

Commit

Permalink
Handle intel / ARM on mac for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2605 committed Sep 12, 2024
1 parent a0ba56b commit 6b94dec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/ffi/ffi.du
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ import Path;

class TestFFIModule < UnitTest {
testFFIModule() {
const path = Path.join(Path.dirname(__file__), "libs", "test-lib{}".format(FFI.suffix));
const path = Path.join(Path.dirname(__file__), "libs", "test-lib{}{}".format(
System.platform == "darwin" ? System.arch == "x86_64" ? "_64" : "_arm" : "",
FFI.suffix
));
const mod = FFI.load(path);
this.assertEquals(mod.test, "Dictu!");
for(var i = 0; i < 40; i+=2) {
Expand Down
Binary file added tests/ffi/libs/test-lib_64.dylib
Binary file not shown.
File renamed without changes.

0 comments on commit 6b94dec

Please sign in to comment.