Skip to content

Commit 1b10862

Browse files
authored
test: added foreign function test for MacOS, Discussion #1418
Updated minimum required JDK to 23 in doc
1 parent cb9eddb commit 1b10862

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

fxgl-core/src/test/kotlin/com/almasb/fxgl/core/reflect/ForeignFunctionCallerTest.kt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,19 @@ class ForeignFunctionCallerTest {
2626
@EnabledOnOs(OS.WINDOWS)
2727
@Test
2828
@EnabledIfEnvironmentVariable(named = "CI", matches = "true")
29-
fun `Downcall a native function`() {
30-
val file = ResourceExtractor.extractNativeLibAsPath("native-lib-test.dll")
29+
fun `Downcall a native function in Windows`() {
30+
`Downcall a native function`("native-lib-test.dll")
31+
}
32+
33+
@EnabledOnOs(OS.MAC)
34+
@Test
35+
@EnabledIfEnvironmentVariable(named = "CI", matches = "true")
36+
fun `Downcall a native function in MacOS`() {
37+
`Downcall a native function`("native-lib-test.dylib")
38+
}
39+
40+
fun `Downcall a native function`(libName:String) {
41+
val file = ResourceExtractor.extractNativeLibAsPath(libName)
3142

3243
val countDown = CountDownLatch(1)
3344
val count = AtomicInteger()
@@ -61,4 +72,5 @@ class ForeignFunctionCallerTest {
6172

6273
assertThat(count.get(), `is`(25))
6374
}
75+
6476
}
Binary file not shown.

0 commit comments

Comments
 (0)