Running the same test leads to positive or negative results.
@J2clTestInput(TheTest.class)
public class TheTest extends TestCase {
@Test
public void testException() {
int a = new Random().nextInt();
int b = a * 2;
try {
exception(a,b);
fail("Should throw Exception");
} catch (MyException e) {
DomGlobal.console.log("Exception: " + e.getMessage());
}
}
public void exception(int a, int b) {
if (b > a) {
throw new MyException();
}
}
}
j2cl-m-p: 0.20 env: osx java: OpenJDK Runtime Environment Zulu11.56+19-CA (build 11.0.15+10-LTS)
Running the same test leads to positive or negative results.
build.log
reproducer: https://github.com/treblereel/j2cl-tests/tree/bug
How to produce it: 1) clone repo and use branch 'bug' 2) run
mvn clean j2cl:test
3) runmvn j2cl:test
several times