Changed format of test data for word selection test - each test's data in own directory
This commit is contained in:
@@ -24,37 +24,40 @@ import java.io.File;
|
|||||||
|
|
||||||
public class WordSelectionTest extends JetLightCodeInsightFixtureTestCase {
|
public class WordSelectionTest extends JetLightCodeInsightFixtureTestCase {
|
||||||
public void testStatements() {
|
public void testStatements() {
|
||||||
doTest(11);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWhenEntries() {
|
public void testWhenEntries() {
|
||||||
doTest(6);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTypeArguments() {
|
public void testTypeArguments() {
|
||||||
doTest(1);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testValueArguments() {
|
public void testValueArguments() {
|
||||||
doTest(1);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTypeParameters() {
|
public void testTypeParameters() {
|
||||||
doTest(1);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testValueParameters() {
|
public void testValueParameters() {
|
||||||
doTest(1);
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doTest(int howMany) {
|
private void doTest() {
|
||||||
String testName = getTestName(false);
|
String dirName = getTestName(false);
|
||||||
String[] afterFiles = new String[howMany];
|
|
||||||
for (int i = 1; i <= howMany; i++) {
|
File dir = new File(myFixture.getTestDataPath() + dirName);
|
||||||
afterFiles[i - 1] = String.format("%s.%d.kt", testName, i);
|
int filesCount = dir.listFiles().length;
|
||||||
|
String[] afterFiles = new String[filesCount - 1];
|
||||||
|
for (int i = 1; i < filesCount; i++) {
|
||||||
|
afterFiles[i - 1] = dirName + File.separator + i + ".kt";
|
||||||
}
|
}
|
||||||
|
|
||||||
CodeInsightTestUtil.doWordSelectionTest(myFixture, testName + ".kt", afterFiles);
|
CodeInsightTestUtil.doWordSelectionTest(myFixture, dirName + File.separator + "0.kt", afterFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in New Issue
Block a user