Do not use 'dup' for postfix increment/decrement: can't do it with collection element in general.
KT-11190, KT-11191, KT-11192, KT-11200, KT-11206
This commit is contained in:
@@ -557,22 +557,31 @@ public class AsmUtil {
|
||||
}
|
||||
|
||||
public static void genIncrement(Type expectedType, int myDelta, InstructionAdapter v) {
|
||||
if (expectedType == Type.LONG_TYPE) {
|
||||
v.lconst(myDelta);
|
||||
numConst(myDelta, expectedType, v);
|
||||
v.add(expectedType);
|
||||
}
|
||||
|
||||
public static void numConst(int value, Type type, InstructionAdapter v) {
|
||||
if (type == Type.FLOAT_TYPE) {
|
||||
v.fconst(value);
|
||||
}
|
||||
else if (expectedType == Type.FLOAT_TYPE) {
|
||||
v.fconst(myDelta);
|
||||
else if (type == Type.DOUBLE_TYPE) {
|
||||
v.dconst(value);
|
||||
}
|
||||
else if (expectedType == Type.DOUBLE_TYPE) {
|
||||
v.dconst(myDelta);
|
||||
else if (type == Type.LONG_TYPE) {
|
||||
v.lconst(value);
|
||||
}
|
||||
else if (type == Type.CHAR_TYPE || type == Type.BYTE_TYPE || type == Type.SHORT_TYPE || type == Type.INT_TYPE) {
|
||||
v.iconst(value);
|
||||
}
|
||||
else {
|
||||
v.iconst(myDelta);
|
||||
v.add(Type.INT_TYPE);
|
||||
StackValue.coerce(Type.INT_TYPE, expectedType, v);
|
||||
return;
|
||||
throw new IllegalArgumentException("Primitive numeric type expected, got: " + type);
|
||||
}
|
||||
v.add(expectedType);
|
||||
}
|
||||
|
||||
public static void genIncrement(Type expectedType, Type baseType, int myDelta, InstructionAdapter v) {
|
||||
genIncrement(baseType, myDelta, v);
|
||||
StackValue.coerce(baseType, expectedType, v);
|
||||
}
|
||||
|
||||
public static void swap(InstructionAdapter v, Type stackTop, Type afterTop) {
|
||||
|
||||
@@ -3319,26 +3319,31 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
return StackValue.operation(asmBaseType, new Function1<InstructionAdapter, Unit>() {
|
||||
@Override
|
||||
public Unit invoke(InstructionAdapter v) {
|
||||
StackValue value = gen(expression.getBaseExpression());
|
||||
value = StackValue.complexWriteReadReceiver(value);
|
||||
StackValue value = StackValue.complexWriteReadReceiver(gen(expression.getBaseExpression()));
|
||||
|
||||
Type type = expressionType(expression.getBaseExpression());
|
||||
value.put(type, v); // old value
|
||||
value.put(asmBaseType, v);
|
||||
AsmUtil.dup(v, asmBaseType);
|
||||
|
||||
value.dup(v, true);
|
||||
StackValue previousValue = StackValue.local(myFrameMap.enterTemp(asmBaseType), asmBaseType);
|
||||
previousValue.store(StackValue.onStack(asmBaseType), v);
|
||||
|
||||
Type storeType;
|
||||
if (isPrimitiveNumberClassDescriptor && AsmUtil.isPrimitive(asmBaseType)) {
|
||||
genIncrement(asmResultType, increment, v);
|
||||
storeType = type;
|
||||
genIncrement(asmResultType, asmBaseType, increment, v);
|
||||
storeType = asmBaseType;
|
||||
}
|
||||
else {
|
||||
StackValue result = invokeFunction(resolvedCall, StackValue.onStack(type));
|
||||
StackValue result = invokeFunction(resolvedCall, StackValue.onStack(asmBaseType));
|
||||
result.put(result.type, v);
|
||||
storeType = result.type;
|
||||
}
|
||||
|
||||
value.store(StackValue.onStack(storeType), v, true);
|
||||
|
||||
previousValue.put(asmBaseType, v);
|
||||
|
||||
myFrameMap.leaveTemp(asmBaseType);
|
||||
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
object Map1 {
|
||||
operator fun get(i: Int, j: Int) = Map2
|
||||
}
|
||||
|
||||
object Map2 {
|
||||
operator fun get(i: Int, j: Int) = 0
|
||||
operator fun set(i: Int, j: Int, newValue: Int) {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
Map1[0, 0][0, 0]++
|
||||
return "OK"
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
fun box(): String {
|
||||
val aByte: Array<Byte> = arrayOf<Byte>(1)
|
||||
val bByte: ByteArray = byteArrayOf(1)
|
||||
|
||||
val aShort: Array<Short> = arrayOf<Short>(1)
|
||||
val bShort: ShortArray = shortArrayOf(1)
|
||||
|
||||
val aInt: Array<Int> = arrayOf<Int>(1)
|
||||
val bInt: IntArray = intArrayOf(1)
|
||||
|
||||
val aLong: Array<Long> = arrayOf<Long>(1)
|
||||
val bLong: LongArray = longArrayOf(1)
|
||||
|
||||
val aFloat: Array<Float> = arrayOf<Float>(1.0f)
|
||||
val bFloat: FloatArray = floatArrayOf(1.0f)
|
||||
|
||||
val aDouble: Array<Double> = arrayOf<Double>(1.0)
|
||||
val bDouble: DoubleArray = doubleArrayOf(1.0)
|
||||
|
||||
aByte[0]--
|
||||
bByte[0]--
|
||||
if (aByte[0] != bByte[0]) return "Failed post-decrement Byte: ${aByte[0]} != ${bByte[0]}"
|
||||
|
||||
aByte[0]++
|
||||
bByte[0]++
|
||||
if (aByte[0] != bByte[0]) return "Failed post-increment Byte: ${aByte[0]} != ${bByte[0]}"
|
||||
|
||||
aShort[0]--
|
||||
bShort[0]--
|
||||
if (aShort[0] != bShort[0]) return "Failed post-decrement Short: ${aShort[0]} != ${bShort[0]}"
|
||||
|
||||
aShort[0]++
|
||||
bShort[0]++
|
||||
if (aShort[0] != bShort[0]) return "Failed post-increment Short: ${aShort[0]} != ${bShort[0]}"
|
||||
|
||||
aInt[0]--
|
||||
bInt[0]--
|
||||
if (aInt[0] != bInt[0]) return "Failed post-decrement Int: ${aInt[0]} != ${bInt[0]}"
|
||||
|
||||
aInt[0]++
|
||||
bInt[0]++
|
||||
if (aInt[0] != bInt[0]) return "Failed post-increment Int: ${aInt[0]} != ${bInt[0]}"
|
||||
|
||||
aLong[0]--
|
||||
bLong[0]--
|
||||
if (aLong[0] != bLong[0]) return "Failed post-decrement Long: ${aLong[0]} != ${bLong[0]}"
|
||||
|
||||
aLong[0]++
|
||||
bLong[0]++
|
||||
if (aLong[0] != bLong[0]) return "Failed post-increment Long: ${aLong[0]} != ${bLong[0]}"
|
||||
|
||||
aFloat[0]++
|
||||
bFloat[0]++
|
||||
if (aFloat[0] != bFloat[0]) return "Failed post-increment Float: ${aFloat[0]} != ${bFloat[0]}"
|
||||
|
||||
aFloat[0]--
|
||||
bFloat[0]--
|
||||
if (aFloat[0] != bFloat[0]) return "Failed post-decrement Float: ${aFloat[0]} != ${bFloat[0]}"
|
||||
|
||||
aDouble[0]++
|
||||
bDouble[0]++
|
||||
if (aDouble[0] != bDouble[0]) return "Failed post-increment Double: ${aDouble[0]} != ${bDouble[0]}"
|
||||
|
||||
aDouble[0]--
|
||||
bDouble[0]--
|
||||
if (aDouble[0] != bDouble[0]) return "Failed post-decrement Double: ${aDouble[0]} != ${bDouble[0]}"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
object A {
|
||||
var x = 0
|
||||
|
||||
operator fun get(i1: Int, i2: Int, i3: Int): Int = x
|
||||
|
||||
operator fun set(i1: Int, i2: Int, i3: Int, value: Int) {
|
||||
x = value
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
A.x = 0
|
||||
val xx = A[1, 2, 3]++
|
||||
return if (xx != 0 || A.x != 1) "Failed" else "OK"
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
class AByte(var value: Byte) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Byte) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
class AShort(var value: Short) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Short) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
class AInt(var value: Int) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Int) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
class ALong(var value: Long) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Long) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
class AFloat(var value: Float) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Float) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
class ADouble(var value: Double) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: Double) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val aByte = AByte(1)
|
||||
var bByte: Byte = 1
|
||||
|
||||
val aShort = AShort(1)
|
||||
var bShort: Short = 1
|
||||
|
||||
val aInt = AInt(1)
|
||||
var bInt: Int = 1
|
||||
|
||||
val aLong = ALong(1)
|
||||
var bLong: Long = 1
|
||||
|
||||
val aFloat = AFloat(1.0f)
|
||||
var bFloat: Float = 1.0f
|
||||
|
||||
val aDouble = ADouble(1.0)
|
||||
var bDouble: Double = 1.0
|
||||
|
||||
aByte[0]++
|
||||
bByte++
|
||||
if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aByte[0]--
|
||||
bByte--
|
||||
if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aShort[0]++
|
||||
bShort++
|
||||
if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aShort[0]--
|
||||
bShort--
|
||||
if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aInt[0]++
|
||||
bInt++
|
||||
if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aInt[0]--
|
||||
bInt--
|
||||
if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aLong[0]++
|
||||
bLong++
|
||||
if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aLong[0]--
|
||||
bLong--
|
||||
if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aFloat[0]++
|
||||
bFloat++
|
||||
if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aFloat[0]--
|
||||
bFloat--
|
||||
if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aDouble[0]++
|
||||
bDouble++
|
||||
if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
aDouble[0]--
|
||||
bDouble--
|
||||
if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
operator fun Long.get(i: Int) = this
|
||||
operator fun Long.set(i: Int, newValue: Long) {}
|
||||
|
||||
fun box(): String {
|
||||
var x = 0L
|
||||
val y = x[0]++
|
||||
return if (y == 0L) "OK" else "Failed, y=$y"
|
||||
}
|
||||
Vendored
+77
@@ -0,0 +1,77 @@
|
||||
class A<T>(var value: T) {
|
||||
operator fun get(i: Int) = value
|
||||
|
||||
operator fun set(i: Int, newValue: T) {
|
||||
value = newValue
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val aByte = A<Byte>(1)
|
||||
var bByte: Byte = 1
|
||||
|
||||
val aShort = A<Short>(1)
|
||||
var bShort: Short = 1
|
||||
|
||||
val aInt = A<Int>(1)
|
||||
var bInt: Int = 1
|
||||
|
||||
val aLong = A<Long>(1)
|
||||
var bLong: Long = 1
|
||||
|
||||
val aFloat = A<Float>(1.0f)
|
||||
var bFloat: Float = 1.0f
|
||||
|
||||
val aDouble = A<Double>(1.0)
|
||||
var bDouble: Double = 1.0
|
||||
|
||||
aByte[0]++
|
||||
bByte++
|
||||
if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aByte[0]--
|
||||
bByte--
|
||||
if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aShort[0]++
|
||||
bShort++
|
||||
if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aShort[0]--
|
||||
bShort--
|
||||
if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aInt[0]++
|
||||
bInt++
|
||||
if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aInt[0]--
|
||||
bInt--
|
||||
if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aLong[0]++
|
||||
bLong++
|
||||
if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aLong[0]--
|
||||
bLong--
|
||||
if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aFloat[0]++
|
||||
bFloat++
|
||||
if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aFloat[0]--
|
||||
bFloat--
|
||||
if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aDouble[0]++
|
||||
bDouble++
|
||||
if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
aDouble[0]--
|
||||
bDouble--
|
||||
if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
object ExtProvider {
|
||||
operator fun Long.get(i: Int) = this
|
||||
operator fun Long.set(i: Int, newValue: Long) {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
with (ExtProvider) {
|
||||
var x = 0L
|
||||
val y = x[0]++
|
||||
return if (y == 0L) "OK" else "Failed, y=$y"
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
fun box(): String {
|
||||
val aByte = arrayListOf<Byte>(1)
|
||||
var bByte: Byte = 1
|
||||
|
||||
val aShort = arrayListOf<Short>(1)
|
||||
var bShort: Short = 1
|
||||
|
||||
val aInt = arrayListOf<Int>(1)
|
||||
var bInt: Int = 1
|
||||
|
||||
val aLong = arrayListOf<Long>(1)
|
||||
var bLong: Long = 1
|
||||
|
||||
val aFloat = arrayListOf<Float>(1.0f)
|
||||
var bFloat: Float = 1.0f
|
||||
|
||||
val aDouble = arrayListOf<Double>(1.0)
|
||||
var bDouble: Double = 1.0
|
||||
|
||||
aByte[0]--
|
||||
bByte--
|
||||
|
||||
if (aByte[0] != bByte) return "Failed post-decrement Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aByte[0]++
|
||||
bByte++
|
||||
|
||||
if (aByte[0] != bByte) return "Failed post-increment Byte: ${aByte[0]} != $bByte"
|
||||
|
||||
aShort[0]--
|
||||
bShort--
|
||||
|
||||
if (aShort[0] != bShort) return "Failed post-decrement Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aShort[0]++
|
||||
bShort++
|
||||
|
||||
if (aShort[0] != bShort) return "Failed post-increment Short: ${aShort[0]} != $bShort"
|
||||
|
||||
aInt[0]--
|
||||
bInt--
|
||||
|
||||
if (aInt[0] != bInt) return "Failed post-decrement Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aInt[0]++
|
||||
bInt++
|
||||
|
||||
if (aInt[0] != bInt) return "Failed post-increment Int: ${aInt[0]} != $bInt"
|
||||
|
||||
aLong[0]--
|
||||
bLong--
|
||||
|
||||
if (aLong[0] != bLong) return "Failed post-decrement Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aLong[0]++
|
||||
bLong++
|
||||
|
||||
if (aLong[0] != bLong) return "Failed post-increment Long: ${aLong[0]} != $bLong"
|
||||
|
||||
aFloat[0]--
|
||||
bFloat--
|
||||
|
||||
if (aFloat[0] != bFloat) return "Failed post-decrement Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aFloat[0]++
|
||||
bFloat++
|
||||
|
||||
if (aFloat[0] != bFloat) return "Failed post-increment Float: ${aFloat[0]} != $bFloat"
|
||||
|
||||
aDouble[0]--
|
||||
bDouble--
|
||||
|
||||
if (aDouble[0] != bDouble) return "Failed post-decrement Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
aDouble[0]++
|
||||
bDouble++
|
||||
|
||||
if (aDouble[0] != bDouble) return "Failed post-increment Double: ${aDouble[0]} != $bDouble"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
fun box(): String {
|
||||
var aByte: Byte? = 0
|
||||
var bByte: Byte = 0
|
||||
|
||||
var aShort: Short? = 0
|
||||
var bShort: Short = 0
|
||||
|
||||
var aInt: Int? = 0
|
||||
var bInt: Int = 0
|
||||
|
||||
var aLong: Long? = 0
|
||||
var bLong: Long = 0
|
||||
|
||||
var aFloat: Float? = 0.0f
|
||||
var bFloat: Float = 0.0f
|
||||
|
||||
var aDouble: Double? = 0.0
|
||||
var bDouble: Double = 0.0
|
||||
|
||||
if (aByte != null) aByte--
|
||||
bByte--
|
||||
if (aByte != bByte) return "Failed post-decrement Byte: $aByte != $bByte"
|
||||
|
||||
if (aByte != null) aByte++
|
||||
bByte++
|
||||
if (aByte != bByte) return "Failed post-increment Byte: $aByte != $bByte"
|
||||
|
||||
if (aShort != null) aShort--
|
||||
bShort--
|
||||
if (aShort != bShort) return "Failed post-decrement Short: $aShort != $bShort"
|
||||
|
||||
if (aShort != null) aShort++
|
||||
bShort++
|
||||
if (aShort != bShort) return "Failed post-increment Short: $aShort != $bShort"
|
||||
|
||||
if (aInt != null) aInt--
|
||||
bInt--
|
||||
if (aInt != bInt) return "Failed post-decrement Int: $aInt != $bInt"
|
||||
|
||||
if (aInt != null) aInt++
|
||||
bInt++
|
||||
if (aInt != bInt) return "Failed post-increment Int: $aInt != $bInt"
|
||||
|
||||
if (aLong != null) aLong--
|
||||
bLong--
|
||||
if (aLong != bLong) return "Failed post-decrement Long: $aLong != $bLong"
|
||||
|
||||
if (aLong != null) aLong++
|
||||
bLong++
|
||||
if (aLong != bLong) return "Failed post-increment Long: $aLong != $bLong"
|
||||
|
||||
if (aFloat != null) aFloat--
|
||||
bFloat--
|
||||
if (aFloat != bFloat) return "Failed post-decrement Float: $aFloat != $bFloat"
|
||||
|
||||
if (aFloat != null) aFloat++
|
||||
bFloat++
|
||||
if (aFloat != bFloat) return "Failed post-increment Float: $aFloat != $bFloat"
|
||||
|
||||
if (aDouble != null) aDouble--
|
||||
bDouble--
|
||||
if (aDouble != bDouble) return "Failed post-decrement Double: $aDouble != $bDouble"
|
||||
|
||||
if (aDouble != null) aDouble++
|
||||
bDouble++
|
||||
if (aDouble != bDouble) return "Failed post-increment Double: $aDouble != $bDouble"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -5944,6 +5944,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedMaps.kt")
|
||||
public void testNestedMaps() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("overloadedSet.kt")
|
||||
public void testOverloadedSet() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt");
|
||||
|
||||
+57
@@ -2732,6 +2732,63 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class PostfixIncrementDecrement extends AbstractBlackBoxCodegenTest {
|
||||
public void testAllFilesPresentInPostfixIncrementDecrement() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("arrayElement.kt")
|
||||
public void testArrayElement() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/arrayElement.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classNaryGetSet.kt")
|
||||
public void testClassNaryGetSet() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classNaryGetSet.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("classWithGetSet.kt")
|
||||
public void testClassWithGetSet() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/classWithGetSet.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("extOnLong.kt")
|
||||
public void testExtOnLong() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/extOnLong.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("genericClassWithGetSet.kt")
|
||||
public void testGenericClassWithGetSet() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/genericClassWithGetSet.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtOnLong.kt")
|
||||
public void testMemberExtOnLong() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/memberExtOnLong.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("mutableListElement.kt")
|
||||
public void testMutableListElement() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/mutableListElement.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nullable.kt")
|
||||
public void testNullable() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/postfixIncrementDecrement/nullable.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/boxWithStdlib/privateConstructor")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
Reference in New Issue
Block a user