Drop platform parameter in diagnostic tests(partial revert of 2a334fc).
This commit is contained in:
@@ -113,7 +113,7 @@ public class JetTestUtils {
|
||||
*
|
||||
* Several files may follow one module
|
||||
*/
|
||||
public static final Pattern FILE_OR_MODULE_PATTERN = Pattern.compile("(?://\\s*MODULE(?:\\[(\\w+)\\])?:\\s*(\\w+)(\\(\\w+(?:, \\w+)*\\))?\\s*)?" +
|
||||
public static final Pattern FILE_OR_MODULE_PATTERN = Pattern.compile("(?://\\s*MODULE:\\s*(\\w+)(\\(\\w+(?:, \\w+)*\\))?\\s*)?" +
|
||||
"//\\s*FILE:\\s*(.*)$", Pattern.MULTILINE);
|
||||
public static final Pattern DIRECTIVE_PATTERN = Pattern.compile("^//\\s*!(\\w+)(:\\s*(.*)$)?", Pattern.MULTILINE);
|
||||
|
||||
@@ -500,7 +500,7 @@ public class JetTestUtils {
|
||||
|
||||
public interface TestFileFactory<M, F> {
|
||||
F createFile(@Nullable M module, @NotNull String fileName, @NotNull String text, @NotNull Map<String, String> directives);
|
||||
M createModule(@NotNull String name, @Nullable String platform, @NotNull List<String> dependencies);
|
||||
M createModule(@NotNull String name, @NotNull List<String> dependencies);
|
||||
}
|
||||
|
||||
public static abstract class TestFileFactoryNoModules<F> implements TestFileFactory<Void, F> {
|
||||
@@ -518,7 +518,7 @@ public class JetTestUtils {
|
||||
public abstract F create(@NotNull String fileName, @NotNull String text, @NotNull Map<String, String> directives);
|
||||
|
||||
@Override
|
||||
public Void createModule(@NotNull String name, @Nullable String platform, @NotNull List<String> dependencies) {
|
||||
public Void createModule(@NotNull String name, @NotNull List<String> dependencies) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -538,14 +538,13 @@ public class JetTestUtils {
|
||||
M module = null;
|
||||
// Many files
|
||||
while (true) {
|
||||
String platform = matcher.group(1);
|
||||
String moduleName = matcher.group(2);
|
||||
String moduleDependencies = matcher.group(3);
|
||||
String moduleName = matcher.group(1);
|
||||
String moduleDependencies = matcher.group(2);
|
||||
if (moduleName != null) {
|
||||
module = factory.createModule(moduleName, platform, parseDependencies(moduleDependencies));
|
||||
module = factory.createModule(moduleName, parseDependencies(moduleDependencies));
|
||||
}
|
||||
|
||||
String fileName = matcher.group(4);
|
||||
String fileName = matcher.group(3);
|
||||
int start = processedChars;
|
||||
|
||||
boolean nextFileExists = matcher.find();
|
||||
|
||||
Reference in New Issue
Block a user