public static Test suite() { // TestSuite suite = new TestSuite(); // suite.addTest(new JetResolveTest("/resolve/Basic.jet", "basic")); // return suite; return JetTestCaseBuilder.suiteForDirectory( getHomeDirectory() + "/compiler/testData/", "/resolve/", true, new JetTestCaseBuilder.NamedTestFactory() { @NotNull @Override public Test createTest( @NotNull String dataPath, @NotNull String name, @NotNull File file) { return new JetResolveTest(dataPath + "/" + name + ".jet", name); } }); }
public static Test suite() { // setFilter(); //to launch only part of tests TestSuite suite = new TestSuite(); FilenameFilter singleFileNameFilter = new FilenameFilter() { @Override public boolean accept(File file, String s) { return s.startsWith("before") && !JetPsiCheckerMultifileTest.isMultiFileName(s); } }; JetTestCaseBuilder.NamedTestFactory singleFileNamedTestFactory = new JetTestCaseBuilder.NamedTestFactory() { @NotNull @Override public Test createTest( @NotNull String dataPath, @NotNull String name, @NotNull File file) { return new JetQuickFixTest(dataPath, name); } }; File dir = new File(getTestDataPathBase()); List<String> subDirs = Arrays.asList(quickFixTestsFilter != null ? dir.list(quickFixTestsFilter) : dir.list()); Collections.sort(subDirs); for (String subDirName : subDirs) { final TestSuite singleFileTestSuite = JetTestCaseBuilder.suiteForDirectory( getTestDataPathBase(), subDirName, true, singleFileNameFilter, singleFileNamedTestFactory); if (singleFileTestSuite.countTestCases() != 0) { suite.addTest(singleFileTestSuite); } } return suite; }
public static String getTestDataPathBase() { return JetTestCaseBuilder.getHomeDirectory() + "/idea/testData/quickfix/"; }
@Override protected String getTestDataPath() { return JetTestCaseBuilder.getTestDataPathBase(); }
@Override protected String getTestDataPath() { return JetTestCaseBuilder.getHomeDirectory() + "/idea/testData/kotlinAndJavaChecker/"; }