mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Add test case for https://github.com/konsoletyper/teavm/issues/27
This commit is contained in:
parent
b151f709ee
commit
4a3e11d1af
|
@ -83,4 +83,17 @@ public class VMTest {
|
|||
public void surrogateInStringLiteralsWork() {
|
||||
assertEquals(0xDDC2, "a\uDDC2b".charAt(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void separatesExceptionAndVariable() {
|
||||
int n = foo();
|
||||
try {
|
||||
bar();
|
||||
} catch (RuntimeException e) {
|
||||
assertEquals(RuntimeException.class, e.getClass());
|
||||
assertEquals(2, n);
|
||||
}
|
||||
}
|
||||
private int foo() { return 2; }
|
||||
private void bar() { throw new RuntimeException(); }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user