Better message for long constants.

This commit is contained in:
Pavel V. Talanov
2012-07-27 13:15:47 +04:00
parent 99bf7553e0
commit b234294863
3 changed files with 20 additions and 2 deletions
@@ -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 "));
}
}
}