Added assertion. There should be either space symbol after prefix (e.g., //ABSENT: A) or no symbols at all (e.g. //RUNTIME).
This commit is contained in:
@@ -117,6 +117,9 @@ public final class InTextDirectivesUtils {
|
||||
Character.isWhitespace(prefix.charAt(prefix.length() - 1))) {
|
||||
result.add(noPrefixLine.trim());
|
||||
break;
|
||||
} else {
|
||||
throw new AssertionError(
|
||||
"Line starts with prefix \"" + prefix + "\", but doesn't have space symbol after it: " + line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ public abstract class JetLightCodeInsightFixtureTestCase extends LightCodeInsigh
|
||||
if (!withLibraryDirective.isEmpty()) {
|
||||
return new JdkAndMockLibraryProjectDescriptor(PluginTestCaseBase.getTestDataPathBase() + "/" + withLibraryDirective.get(0), true);
|
||||
}
|
||||
else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME")) {
|
||||
return JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE;
|
||||
}
|
||||
else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME_WITH_SOURCES")) {
|
||||
return ProjectDescriptorWithStdlibSources.INSTANCE;
|
||||
}
|
||||
else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME")) {
|
||||
return JetWithJdkAndRuntimeLightProjectDescriptor.INSTANCE;
|
||||
}
|
||||
else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "JS")) {
|
||||
return JetStdJSProjectDescriptor.INSTANCE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user