File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Samples/SwiftKitSampleApp/src/test/java/com/example/swift Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import org .junit .jupiter .api .Disabled ;
18
18
import org .junit .jupiter .api .Test ;
19
+ import org .swift .swiftkit .SwiftKit ;
20
+
21
+ import java .io .File ;
22
+ import java .util .stream .Stream ;
19
23
20
24
import static org .junit .jupiter .api .Assertions .*;
21
25
22
26
public class MySwiftClassTest {
23
27
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
+
24
42
@ Test
25
43
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
+ }
28
50
}
29
51
30
52
@ Test
Original file line number Diff line number Diff line change @@ -323,7 +323,7 @@ extension Swift2JavaTranslator {
323
323
private static SymbolLookup getSymbolLookup() {
324
324
// Ensure Swift and our Lib are loaded during static initialization of the class.
325
325
System.loadLibrary( " swiftCore " );
326
- System.loadLibrary( " swiftKitSwift " );
326
+ System.loadLibrary( " SwiftKitSwift " );
327
327
System.loadLibrary(LIB_NAME);
328
328
329
329
if (PlatformUtils.isMacOS()) {
You can’t perform that action at this time.
0 commit comments