Skip to content

Commit 27090a5

Browse files
committed
test
1 parent e70738f commit 27090a5

28 files changed

+51
-15
lines changed

.idea/IntelliJ-EmmyLua.iml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/testSources/FileTree.kt renamed to src/test/kotlin/com/tang/intellij/test/FileTree.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
/*
2+
* Copyright (c) 2017. tangzx([email protected])
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.tang.intellij.test/*
218
* Use of this source code is governed by the MIT license that can be
319
* found in the LICENSE file.
420
*/

src/main/testSources/LuaTestBase.kt renamed to src/test/kotlin/com/tang/intellij/test/LuaTestBase.kt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (c) 2017. tangzx([email protected])
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.tang.intellij.test
18+
119
import com.intellij.openapi.fileEditor.FileDocumentManager
220
import com.intellij.testFramework.fixtures.LightPlatformCodeInsightFixtureTestCase
321
import org.intellij.lang.annotations.Language
@@ -23,9 +41,9 @@ abstract class LuaTestBase : LightPlatformCodeInsightFixtureTestCase() {
2341
fileTreeFromText(before).create()
2442
action()
2543
FileDocumentManager.getInstance().saveAllDocuments()
26-
fileTreeFromText(after).assertEquals(myFixture.findFileInTempDir("."))
44+
fileTreeFromText(after).assertEquals(myFixture.findFileInTempDir(""))
2745
}
2846

2947
protected fun FileTree.create(): TestProject =
30-
create(myFixture.project, myFixture.findFileInTempDir("."))
48+
create(myFixture.project, myFixture.findFileInTempDir(""))
3149
}

src/main/testSources/completion/TestCompletion.kt renamed to src/test/kotlin/com/tang/intellij/test/completion/TestCompletion.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17-
package completion
17+
package com.tang.intellij.test.completion
1818

19-
import LuaTestBase
19+
import com.tang.intellij.test.LuaTestBase
2020
import com.intellij.codeInsight.completion.CompletionType
2121
import java.util.*
2222

@@ -26,7 +26,7 @@ import java.util.*
2626
*/
2727
class TestCompletion : LuaTestBase() {
2828
override fun getTestDataPath(): String {
29-
return "src/main/testData/completion"
29+
return "src/test/resources/completion"
3030
}
3131

3232
fun testLocalCompletion() {

src/main/testSources/inspections/LocalNameHidesPreviousTest.kt renamed to src/test/kotlin/com/tang/intellij/test/inspections/LocalNameHidesPreviousTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package inspections
17+
package com.tang.intellij.test.inspections
1818

1919
import com.tang.intellij.lua.codeInsight.inspection.LocalNameHidesPrevious
2020

src/main/testSources/inspections/LuaInspectionsTestBase.kt renamed to src/test/kotlin/com/tang/intellij/test/inspections/LuaInspectionsTestBase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17-
package inspections
17+
package com.tang.intellij.test.inspections
1818

19-
import LuaTestBase
19+
import com.tang.intellij.test.LuaTestBase
2020
import com.intellij.codeInspection.LocalInspectionTool
2121
import org.intellij.lang.annotations.Language
2222

src/main/testSources/inspections/MatchFunctionSignatureTest.kt renamed to src/test/kotlin/com/tang/intellij/test/inspections/MatchFunctionSignatureTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package inspections
17+
package com.tang.intellij.test.inspections
1818

1919
import com.tang.intellij.lua.codeInsight.inspection.MatchFunctionSignatureInspection
2020

src/main/testSources/inspections/ReturnTypeTest.kt renamed to src/test/kotlin/com/tang/intellij/test/inspections/ReturnTypeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package inspections
17+
package com.tang.intellij.test.inspections
1818

1919
import com.tang.intellij.lua.codeInsight.inspection.ReturnTypeInspection
2020

src/main/testSources/inspections/UndeclaredVariableTest.kt renamed to src/test/kotlin/com/tang/intellij/test/inspections/UndeclaredVariableTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package inspections
17+
package com.tang.intellij.test.inspections
1818

1919
import com.tang.intellij.lua.codeInsight.inspection.UndeclaredVariableInspection
2020

src/main/testSources/refactoring/MoveFileTest.kt renamed to src/test/kotlin/com/tang/intellij/test/refactoring/MoveFileTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package refactoring
17+
package com.tang.intellij.test.refactoring
1818

1919
import com.intellij.openapi.fileEditor.FileDocumentManager
2020
import com.intellij.psi.PsiElement
@@ -24,7 +24,7 @@ import com.intellij.refactoring.move.moveFilesOrDirectories.MoveFilesOrDirectori
2424
class MoveFileTest : MultiFileTestCase() {
2525
override fun getTestRoot() = "/refactoring/"
2626

27-
override fun getTestDataPath() = "src/main/testData/"
27+
override fun getTestDataPath() = "src/test/resources/"
2828

2929
fun testMoveFile() {
3030
val fileToMove = "A.lua"

0 commit comments

Comments
 (0)