Skip to content

Commit 654d0a2

Browse files
committed
debugging paths on ci
1 parent bda5b37 commit 654d0a2

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

Samples/SwiftKitSampleApp/src/test/java/com/example/swift/MySwiftClassTest.java

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,37 @@
1616

1717
import org.junit.jupiter.api.Disabled;
1818
import org.junit.jupiter.api.Test;
19+
import org.swift.swiftkit.SwiftKit;
20+
21+
import java.io.File;
22+
import java.util.stream.Stream;
1923

2024
import static org.junit.jupiter.api.Assertions.*;
2125

2226
public class MySwiftClassTest {
2327

28+
void checkPaths(Throwable throwable) {
29+
var paths = SwiftKit.getJavaLibraryPath().split(":");
30+
for (var path : paths) {
31+
System.out.println("CHECKING PATH: " + path);
32+
Stream.of(new File(path).listFiles())
33+
.filter(file -> !file.isDirectory())
34+
.forEach((file) -> {
35+
System.out.println(" - " + file.getPath());
36+
});
37+
}
38+
39+
throw new RuntimeException(throwable);
40+
}
41+
2442
@Test
2543
void test_MySwiftClass_voidMethod() {
26-
MySwiftClass o = new MySwiftClass(12, 42);
27-
o.voidMethod();
44+
try {
45+
MySwiftClass o = new MySwiftClass(12, 42);
46+
o.voidMethod();
47+
} catch (Throwable throwable) {
48+
checkPaths(throwable);
49+
}
2850
}
2951

3052
@Test

0 commit comments

Comments
 (0)