From fe8a0ec2bc3dd7666c58de07dfa20f9f7bf49cd5 Mon Sep 17 00:00:00 2001 From: Alexey Sedunov Date: Wed, 3 Feb 2016 14:38:50 +0300 Subject: [PATCH] Move: Additional test for KT-10553 (private top-level property with default accessors) --- .../movePrivatePropertyWithDefaultAccessors/after/main.kt | 4 ++++ .../movePrivatePropertyWithDefaultAccessors/after/utils.kt | 3 +++ .../movePrivatePropertyWithDefaultAccessors/before/main.kt | 4 ++++ .../movePrivatePropertyWithDefaultAccessors/before/utils.kt | 3 +++ .../movePrivatePropertyWithDefaultAccessors/conflicts.txt | 1 + .../movePrivatePropertyWithDefaultAccessors.test | 5 +++++ .../kotlin/idea/refactoring/move/MoveTestGenerated.java | 6 ++++++ 7 files changed, 26 insertions(+) create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/main.kt create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/utils.kt create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/main.kt create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/utils.kt create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/conflicts.txt create mode 100644 idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/main.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/main.kt new file mode 100644 index 00000000000..da1556ad1a9 --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/main.kt @@ -0,0 +1,4 @@ +package a + +private val used: Int = 2 +val using: Int = used + 1 \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/utils.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/utils.kt new file mode 100644 index 00000000000..2f15c6d4702 --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/after/utils.kt @@ -0,0 +1,3 @@ +package a + +object Utils \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/main.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/main.kt new file mode 100644 index 00000000000..bdc73ed8081 --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/main.kt @@ -0,0 +1,4 @@ +package a + +private val used: Int = 2 +val using: Int = used + 1 \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/utils.kt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/utils.kt new file mode 100644 index 00000000000..2f15c6d4702 --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/before/utils.kt @@ -0,0 +1,3 @@ +package a + +object Utils \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/conflicts.txt b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/conflicts.txt new file mode 100644 index 00000000000..ab6eceb0469 --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/conflicts.txt @@ -0,0 +1 @@ +Property using uses property used which will be inaccessible after move \ No newline at end of file diff --git a/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test new file mode 100644 index 00000000000..369cb85a0cd --- /dev/null +++ b/idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test @@ -0,0 +1,5 @@ +{ + "mainFile": "main.kt", + "type": "MOVE_KOTLIN_TOP_LEVEL_DECLARATIONS", + "targetFile": "utils.kt" +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java index 36862706010..b3bad22dbba 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java @@ -551,6 +551,12 @@ public class MoveTestGenerated extends AbstractMoveTest { doTest(fileName); } + @TestMetadata("kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test") + public void testKotlin_moveTopLevelDeclarations_movePrivatePropertyWithDefaultAccessors_MovePrivatePropertyWithDefaultAccessors() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test"); + doTest(fileName); + } + @TestMetadata("kotlin/moveTopLevelDeclarations/movePropertyToFile/movePropertyToFile.test") public void testKotlin_moveTopLevelDeclarations_movePropertyToFile_MovePropertyToFile() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToFile/movePropertyToFile.test");