[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,40 @@
class A {
operator fun plusAssign(x: Int) {}
operator fun minusAssign(x: Int) {}
operator fun timesAssign(x: Int) {}
operator fun divAssign(x: Int) {}
operator fun remAssign(x: Int) {}
}
fun testVal() {
val a = A()
a += 1
a -= 1
a *= 1
a /= 1
a %= 1
}
fun testExpr() {
A() += 1
A() -= 1
A() *= 1
A() /= 1
A() %= 1
}
class B {
operator fun plus(x: Int): B = B()
operator fun minus(x: Int): B = B()
operator fun times(x: Int): B = B()
operator fun div(x: Int): B = B()
operator fun rem(x: Int): B = B()
}
fun testWrong() {
<!VARIABLE_EXPECTED!>B()<!> += 1
<!VARIABLE_EXPECTED!>B()<!> -= 1
<!VARIABLE_EXPECTED!>B()<!> *= 1
<!VARIABLE_EXPECTED!>B()<!> /= 1
<!VARIABLE_EXPECTED!>B()<!> %= 1
}