Remove incorrect test, to be reconsidered in the future
Before 3ca4097, 'set' signature was not checked at all in this case
#KT-11272 Open
This commit is contained in:
-73
@@ -1,73 +0,0 @@
|
|||||||
// FILE: Container.java
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
class Container {
|
|
||||||
@NotNull
|
|
||||||
Value get(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return new Value();
|
|
||||||
}
|
|
||||||
|
|
||||||
void set(Runnable i, @NotNull Value value) {
|
|
||||||
i.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Value {
|
|
||||||
@NotNull Value plus(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull Value minus(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull Value times(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull Value div(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull Value mod(Runnable i) {
|
|
||||||
i.run();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// FILE: 1.kt
|
|
||||||
|
|
||||||
fun box(): String {
|
|
||||||
var c = Container()
|
|
||||||
var indexAccess = 0
|
|
||||||
|
|
||||||
var v1 = "FAIL"
|
|
||||||
c[{ indexAccess++ }] += { v1 = "OK" }
|
|
||||||
if (v1 != "OK") return "plus: $v1"
|
|
||||||
|
|
||||||
var v2 = "FAIL"
|
|
||||||
c[{ indexAccess++ }] -= { v2 = "OK" }
|
|
||||||
if (v2 != "OK") return "minus: $v2"
|
|
||||||
|
|
||||||
var v3 = "FAIL"
|
|
||||||
c[{ indexAccess++ }] *= { v3 = "OK" }
|
|
||||||
if (v3 != "OK") return "times: $v3"
|
|
||||||
|
|
||||||
var v4 = "FAIL"
|
|
||||||
c[{ indexAccess++ }] /= { v4 = "OK" }
|
|
||||||
if (v4 != "OK") return "div: $v4"
|
|
||||||
|
|
||||||
var v5 = "FAIL"
|
|
||||||
c[{ indexAccess++ }] %= { v5 = "OK" }
|
|
||||||
if (v5 != "OK") return "mod: $v5"
|
|
||||||
|
|
||||||
if (indexAccess != 10) return "Fail: $indexAccess"
|
|
||||||
|
|
||||||
return "OK"
|
|
||||||
}
|
|
||||||
-6
@@ -683,12 +683,6 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("augmentedAssignmentAndSquareBrackets.kt")
|
|
||||||
public void testAugmentedAssignmentAndSquareBrackets() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentAndSquareBrackets.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("augmentedAssignmentPure.kt")
|
@TestMetadata("augmentedAssignmentPure.kt")
|
||||||
public void testAugmentedAssignmentPure() throws Exception {
|
public void testAugmentedAssignmentPure() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user