Skip to content

Commit 99da538

Browse files
committed
Add test
1 parent d4fb750 commit 99da538

File tree

11 files changed

+5657
-3
lines changed

11 files changed

+5657
-3
lines changed

src/test/kotlin/com/gmail/blueboxware/libgdxplugin/skin/TestInspections.kt

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,28 @@ class TestInspections : LibGDXCodeInsightFixtureTestCase() {
140140
doTest(SkinNonExistingFontFileInspection())
141141
}
142142

143+
144+
fun testSkinComposerWithTags() {
145+
copyDirectoryToProject("../skin-composer/assets", "assets")
146+
copyDirectoryToProject("../skin-composer/com", "com")
147+
listOf(
148+
SkinDeprecatedInspection(),
149+
SkinDuplicatePropertyInspection(),
150+
SkinDuplicateResourceNameInspection(),
151+
SkinMalformedColorStringInspection(),
152+
SkinMissingPropertyInspection(),
153+
SkinNonExistingClassInspection(),
154+
SkinNonExistingFieldInspection(),
155+
SkinNonExistingFontFileInspection(),
156+
SkinNonExistingResourceAliasInspection(),
157+
SkinTypeInspection()
158+
).forEach {
159+
myFixture.enableInspections(it::class.java)
160+
}
161+
162+
myFixture.testHighlighting(true, false, false, "assets/skin-composer-ui.skin")
163+
}
164+
143165
private fun doTest(inspection: LocalInspectionTool) {
144166
myFixture.enableInspections(inspection::class.java)
145167
myFixture.testHighlighting(true, false, false, testname() + ".skin")
@@ -161,9 +183,11 @@ class TestInspections : LibGDXCodeInsightFixtureTestCase() {
161183
removeDummyLibGDX199()
162184
}
163185

164-
copyFileToProject("com/example/ColorArrayHolder.java")
165-
copyFileToProject("com/example/KColorArrayHolder.kt")
166-
copyFileToProject("atlas.atlas", testname() + ".atlas")
186+
if (!testname().endsWith("Composer")) {
187+
copyFileToProject("com/example/ColorArrayHolder.java")
188+
copyFileToProject("com/example/KColorArrayHolder.kt")
189+
copyFileToProject("atlas.atlas", testname() + ".atlas")
190+
}
167191

168192
}
169193

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Raymond Buckley
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Extracted from Skin Composer and TenPatch
2+
3+
Source: https://github.com/raeleus/skin-composer
4+
Author: Raymond Buckley
5+
License: MIT
6+
7+
Source: https://github.com/raeleus/TenPatch
8+
Author: Raymond Buckley
9+
License: MIT
10+

src/test/testdata/filetypes/skin/skin-composer/assets/font-title-export.fnt

Whitespace-only changes.

0 commit comments

Comments
 (0)