Added new string tests

This commit is contained in:
Michael Bogdanov
2015-04-03 18:27:08 +03:00
parent a19c1ed476
commit 0efe8890b8
7 changed files with 98 additions and 6 deletions
@@ -42,6 +42,7 @@ import java.util.regex.Pattern;
BytecodeTextTestGenerated.Statements.class,
BytecodeTextTestGenerated.StaticFields.class,
BytecodeTextTestGenerated.StoreStackBeforeInline.class,
BytecodeTextTestGenerated.StringOperations.class,
BytecodeTextTestGenerated.When.class,
BytecodeTextTestGenerated.WhenEnumOptimization.class,
BytecodeTextTestGenerated.WhenStringOptimization.class,
@@ -208,12 +209,6 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
doTest(fileName);
}
@TestMetadata("stringBuilderAppend.kt")
public void testStringBuilderAppend() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringBuilderAppend.kt");
doTest(fileName);
}
@TestMetadata("topLevelFunWithDefaultArgs.kt")
public void testTopLevelFunWithDefaultArgs() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/topLevelFunWithDefaultArgs.kt");
@@ -661,6 +656,39 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/stringOperations")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class StringOperations extends AbstractBytecodeTextTest {
public void testAllFilesPresentInStringOperations() throws Exception {
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/stringOperations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("concat.kt")
public void testConcat() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/concat.kt");
doTest(fileName);
}
@TestMetadata("infixPlus.kt")
public void testInfixPlus() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/infixPlus.kt");
doTest(fileName);
}
@TestMetadata("interpolation.kt")
public void testInterpolation() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/interpolation.kt");
doTest(fileName);
}
@TestMetadata("plusAssign.kt")
public void testPlusAssign() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/plusAssign.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/when")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)