Fix test: do not propose to change 'mod' to '%'

This commit is contained in:
Mikhail Zarechenskiy
2016-12-07 17:29:03 +03:00
parent 7a09faa606
commit f37b7224da
5 changed files with 29 additions and 1 deletions
@@ -1,4 +1,6 @@
// INTENTION_TEXT: Replace with '%' operator
// INTENTION_TEXT: Replace call with binary operator
// IS_APPLICABLE: false
fun test() {
class Test {
operator fun mod(a: Int): Test = Test()
@@ -1,4 +1,6 @@
// INTENTION_TEXT: Replace with '%' operator
// IS_APPLICABLE: false
fun test() {
class Test {
operator fun mod(a: Int): Test = Test()
@@ -0,0 +1,9 @@
// INTENTION_TEXT: Replace with '%' operator
fun test() {
class Test {
operator fun rem(a: Int): Test = Test()
}
val test = Test()
test.rem<caret>(1)
}
@@ -0,0 +1,9 @@
// INTENTION_TEXT: Replace with '%' operator
fun test() {
class Test {
operator fun rem(a: Int): Test = Test()
}
val test = Test()
test % 1
}
@@ -3054,6 +3054,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
doTest(fileName);
}
@TestMetadata("remSanityTest.kt")
public void testRemSanityTest() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt");
doTest(fileName);
}
@TestMetadata("safeCompareTo.kt")
public void testSafeCompareTo() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/safeCompareTo.kt");