use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class GlobValidationTest method testLocalVariableReference.
@Test
public void testLocalVariableReference() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "foo = ['*.java']", "glob(include = foo)");
assertNoErrors(file);
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class GlobValidationTest method testInvalidListArgumentValue.
@Test
public void testInvalidListArgumentValue() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "glob(include = foo)");
assertHasError(file, "Glob parameter 'include' must be a list of strings");
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class GlobValidationTest method testSingletonExcludeArgumentError.
@Test
public void testSingletonExcludeArgumentError() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "glob(['**/*.java'], exclude = 'BUILD')");
assertHasError(file, "Glob parameter 'exclude' must be a list of strings");
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class GlobValidationTest method testPossibleStringLiteralParameter.
@Test
public void testPossibleStringLiteralParameter() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "def function(param1, param2):", " glob(include = [param1])");
assertNoErrors(file);
}
use of com.google.idea.blaze.base.model.primitives.WorkspacePath in project intellij by bazelbuild.
the class LoadStatementAnnotatorTest method testErrorForUnrecognizedFormat.
@Test
public void testErrorForUnrecognizedFormat() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "load('not a skylark label', 'symbol')");
assertHasAnnotation(file, "Invalid load syntax: missing Skylark module.", HighlightSeverity.ERROR);
}
Aggregations