Add tests for primitive companion object

Update test data
This commit is contained in:
Roman Artemev
2018-08-23 16:41:25 +03:00
committed by romanart
parent 450ed63690
commit cc14442be1
25 changed files with 384 additions and 13 deletions
@@ -14631,6 +14631,54 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
public void testProtectedCompanionObjectAccessedFromNestedClass() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/protectedCompanionObjectAccessedFromNestedClass.kt");
}
@TestMetadata("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class PrimitiveCompanion extends AbstractBlackBoxCodegenTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
}
public void testAllFilesPresentInPrimitiveCompanion() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("byteCompanionObject.kt")
public void testByteCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/byteCompanionObject.kt");
}
@TestMetadata("charCompanionObject.kt")
public void testCharCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/charCompanionObject.kt");
}
@TestMetadata("doubleCompanionObject.kt")
public void testDoubleCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/doubleCompanionObject.kt");
}
@TestMetadata("floatCompanionObject.kt")
public void testFloatCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/floatCompanionObject.kt");
}
@TestMetadata("intCompanionObject.kt")
public void testIntCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/intCompanionObject.kt");
}
@TestMetadata("longCompanionObject.kt")
public void testLongCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/longCompanionObject.kt");
}
@TestMetadata("shortCompanionObject.kt")
public void testShortCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion/shortCompanionObject.kt");
}
}
}
}