Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
radioegor146 committed Feb 5, 2024
1 parent d331e81 commit a61697c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions obfuscator/src/test/java/by/radioegor146/ClassicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void execute() throws Throwable {
Arrays.asList("java",
"-Djava.library.path=.",
"-Dseed=1337",
"-Dplatform=" + platform.name(),
"-Dtest.src=" + temp.toString(),
"-jar", resultJar.toString()));
System.out.println(String.format("Took %dms", testRunResult.execTime));
Expand Down
5 changes: 4 additions & 1 deletion obfuscator/src/test/java/by/radioegor146/TestsGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ public Stream<DynamicTest> generateTests() throws URISyntaxException, IOExceptio
Objects.requireNonNull(tests, "No tests dir in resources");

Path testDir = Paths.get(tests.toURI());
return Files.walk(testDir, FileVisitOption.FOLLOW_LINKS).filter(Files::isDirectory).filter(TestsGenerator::hasJavaFiles).filter(TestsGenerator::testAllowed).map(p -> DynamicTest.dynamicTest(testDir.relativize(p).toString(), new ClassicTest(p, testDir.relativize(p).toString())));
return Files.walk(testDir, FileVisitOption.FOLLOW_LINKS).filter(Files::isDirectory)
.filter(TestsGenerator::hasJavaFiles).filter(TestsGenerator::testAllowed)
.map(p -> DynamicTest.dynamicTest(testDir.relativize(p).toString(),
new ClassicTest(p, testDir.relativize(p).toString())));
}

private static boolean hasJavaFiles(Path path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ public class Test {
private static void printStackTrace() {
StackTraceElement[] stack = new Exception().getStackTrace();
for (int i = 0; i < stack.length; i++) {
if (System.getProperty("platform").equals("ANDROID") && stack[i].getClassName().equals("native0.hidden.Hidden0")) {
continue;
}
System.out.printf("%d: %s.%s\n", i, stack[i].getClassName(), stack[i].getMethodName());
}
}
Expand Down

0 comments on commit a61697c

Please sign in to comment.