use of com.google.idea.blaze.base.lang.buildfile.psi.BuildFile in project intellij by bazelbuild.
the class GlobValidationTest method testNormalGlob.
@Test
public void testNormalGlob() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "glob(['**/*.java'])");
assertNoErrors(file);
}
use of com.google.idea.blaze.base.lang.buildfile.psi.BuildFile in project intellij by bazelbuild.
the class GlobValidationTest method testAllArguments.
@Test
public void testAllArguments() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "glob(['**/*.java'], exclude = ['test/*.java'], exclude_directories = 0)");
assertNoErrors(file);
}
use of com.google.idea.blaze.base.lang.buildfile.psi.BuildFile in project intellij by bazelbuild.
the class GlobValidationTest method testKnownInvalidResolvedString.
@Test
public void testKnownInvalidResolvedString() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "bool_literal = True", "glob([bool_literal])");
assertHasError(file, "Glob parameter 'include' must be a list of strings");
}
use of com.google.idea.blaze.base.lang.buildfile.psi.BuildFile in project intellij by bazelbuild.
the class GlobValidationTest method testUnrecognizedArgumentError.
@Test
public void testUnrecognizedArgumentError() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "glob(['**/*.java'], exclude = ['test/*.java'], extra = 1)");
assertHasError(file, "Unrecognized glob argument");
}
use of com.google.idea.blaze.base.lang.buildfile.psi.BuildFile in project intellij by bazelbuild.
the class GlobValidationTest method testPossibleListExpressionParameter.
@Test
public void testPossibleListExpressionParameter() {
BuildFile file = createBuildFile(new WorkspacePath("java/com/google/BUILD"), "def function(param1, param2):", " glob(include = param1)");
assertNoErrors(file);
}
Aggregations