Introduce language feature: underscores in numeric literals

#KT-2964 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2016-11-06 20:37:04 +03:00
parent a77290e572
commit 3df5efb236
10 changed files with 126 additions and 4 deletions
@@ -21118,6 +21118,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
}
}
@TestMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class UnderscoresInNumericLiterals extends AbstractDiagnosticsTest {
public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("illegalUnderscores.kt")
public void testIllegalUnderscores() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt");
doTest(fileName);
}
@TestMetadata("noUnderscores.kt")
public void testNoUnderscores() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/tests/unit")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)