Add a compiler box test for Boolean.hashCode()
This commit is contained in:
committed by
Space Team
parent
193aa0f935
commit
36924775c8
+6
@@ -35553,6 +35553,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
|
||||
+6
@@ -35553,6 +35553,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
fun box() : String {
|
||||
assertEquals(1231, true.hashCode())
|
||||
assertEquals(1231, hashCode(true))
|
||||
assertEquals(1237, false.hashCode())
|
||||
assertEquals(1237, hashCode(false))
|
||||
|
||||
var b: Boolean? = null
|
||||
assertEquals(0, b.hashCode())
|
||||
assertEquals(0, hashCode(b))
|
||||
b = true
|
||||
assertEquals(1231, b.hashCode())
|
||||
assertEquals(1231, hashCode(b))
|
||||
b = false
|
||||
assertEquals(1237, b.hashCode())
|
||||
assertEquals(1237, hashCode(b))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun hashCode(b: Boolean?): Int {
|
||||
return b.hashCode()
|
||||
}
|
||||
+6
@@ -33957,6 +33957,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
|
||||
+6
@@ -35553,6 +35553,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
|
||||
+6
@@ -35553,6 +35553,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
|
||||
+5
@@ -29023,6 +29023,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithNaN.kt")
|
||||
public void testComparisonWithNaN() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt");
|
||||
|
||||
+6
@@ -24981,6 +24981,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -25197,6 +25197,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -25197,6 +25197,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -25197,6 +25197,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -28335,6 +28335,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -28985,6 +28985,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -28011,6 +28011,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
+6
@@ -28336,6 +28336,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
|
||||
Generated
+5
@@ -22396,6 +22396,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("booleanHashCode.kt")
|
||||
public void testBooleanHashCode() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/booleanHashCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonWithNullCallsFun.kt")
|
||||
public void testComparisonWithNullCallsFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt");
|
||||
|
||||
Reference in New Issue
Block a user