Add tests for primitive companion object
Update test data
This commit is contained in:
+48
@@ -12841,6 +12841,54 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
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 AbstractIrJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPrimitiveCompanion() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+48
@@ -13901,6 +13901,54 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
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 AbstractJsCodegenBoxTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInPrimitiveCompanion() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects/companionObjectAccess/primitiveCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1115
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1115
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1116
|
||||
package foo
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// EXPECTED_REACHABLE_NODES: 1135
|
||||
// CHECK_CONTAINS_NO_CALLS: inRange
|
||||
// CHECK_CONTAINS_NO_CALLS: inRange2
|
||||
|
||||
Reference in New Issue
Block a user