Better message for long constants.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import org.jetbrains.k2js.facade.exceptions.TranslationInternalException;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
@@ -45,4 +47,14 @@ public final class NumberTest extends SingleFileTranslationTest {
|
||||
public void testDivision() throws Exception {
|
||||
fooBoxIsValue("SUCCESS");
|
||||
}
|
||||
|
||||
public void testHexademicalConstant() throws Exception {
|
||||
try {
|
||||
fooBoxTest();
|
||||
} catch (TranslationInternalException e) {
|
||||
Throwable cause = e.getCause();
|
||||
Assert.assertTrue(cause instanceof IllegalStateException);
|
||||
Assert.assertTrue(cause.getMessage().startsWith("Unsupported long constant "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user