regression test for KT-3442

This commit is contained in:
Dmitry Jemerov
2015-03-04 17:41:27 +01:00
parent 7522eb4032
commit 46e0fdc067
2 changed files with 12 additions and 0 deletions
@@ -0,0 +1,6 @@
fun box(): String {
val m = hashMapOf<String, String?>()
m.put("b", null)
val oldValue = m.getOrPut("b", { "Foo" })
return if (oldValue == null) "OK" else "fail: $oldValue"
}
@@ -2892,6 +2892,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
doTestWithStdlib(fileName);
}
@TestMetadata("kt3442.kt")
public void testKt3442() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt3442.kt");
doTestWithStdlib(fileName);
}
@TestMetadata("kt4262.kt")
public void testKt4262() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/regressions/kt4262.kt");