Cover with a test current Double/Float companion values access

This commit is contained in:
Ilya Gorbunov
2020-02-27 01:23:54 +03:00
parent 1f47c6d54f
commit b53cb5cb4c
3 changed files with 32 additions and 0 deletions
@@ -0,0 +1,22 @@
fun main() {
val dmax = Double.MAX_VALUE
val dmin = Double.MIN_VALUE
val dnan = Double.NaN
val dinfp = Double.POSITIVE_INFINITY
val dinfn = Double.NEGATIVE_INFINITY
val fmax = Float.MAX_VALUE
val fmin = Float.MIN_VALUE
val fnan = Float.NaN
val finfp = Float.POSITIVE_INFINITY
val finfn = Float.NEGATIVE_INFINITY
}
// 5 GETSTATIC kotlin/jvm/internal/DoubleCompanionObject.INSTANCE
// 5 GETSTATIC kotlin/jvm/internal/FloatCompanionObject.INSTANCE
// 2 getMAX_VALUE
// 2 getMIN_VALUE
// 2 getNaN
// 2 getPOSITIVE_INFINITY
// 2 getNEGATIVE_INFINITY
@@ -916,6 +916,11 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
} }
@TestMetadata("floatingPointCompanionAccess.kt")
public void testFloatingPointCompanionAccess() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt");
}
@TestMetadata("kt14258_1.kt") @TestMetadata("kt14258_1.kt")
public void testKt14258_1() throws Exception { public void testKt14258_1() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt"); runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt");
@@ -916,6 +916,11 @@ public class IrBytecodeTextTestGenerated extends AbstractIrBytecodeTextTest {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
} }
@TestMetadata("floatingPointCompanionAccess.kt")
public void testFloatingPointCompanionAccess() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/companion/floatingPointCompanionAccess.kt");
}
@TestMetadata("kt14258_1.kt") @TestMetadata("kt14258_1.kt")
public void testKt14258_1() throws Exception { public void testKt14258_1() throws Exception {
runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt"); runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt");