use of com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern in project buck by facebook.
the class BuildTargetPatternParserTest method testParse.
@Test
public void testParse() throws NoSuchBuildTargetException {
BuildTargetPatternParser<BuildTargetPattern> buildTargetPatternParser = BuildTargetPatternParser.forVisibilityArgument();
assertEquals(new ImmediateDirectoryBuildTargetPattern(filesystem.getRootPath(), vfs.getPath("test/com/facebook/buck/parser/")), buildTargetPatternParser.parse(createCellRoots(filesystem), "//test/com/facebook/buck/parser:"));
assertEquals(new SingletonBuildTargetPattern(filesystem.getRootPath(), "//test/com/facebook/buck/parser:parser"), buildTargetPatternParser.parse(createCellRoots(filesystem), "//test/com/facebook/buck/parser:parser"));
assertEquals(new SubdirectoryBuildTargetPattern(filesystem.getRootPath(), vfs.getPath("test/com/facebook/buck/parser/")), buildTargetPatternParser.parse(createCellRoots(filesystem), "//test/com/facebook/buck/parser/..."));
}
use of com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern in project buck by facebook.
the class BuildTargetPatternParserTest method testParseRootPattern.
@Test
public void testParseRootPattern() throws NoSuchBuildTargetException {
BuildTargetPatternParser<BuildTargetPattern> buildTargetPatternParser = BuildTargetPatternParser.forVisibilityArgument();
assertEquals(new ImmediateDirectoryBuildTargetPattern(filesystem.getRootPath(), vfs.getPath("")), buildTargetPatternParser.parse(createCellRoots(filesystem), "//:"));
assertEquals(new SingletonBuildTargetPattern(filesystem.getRootPath(), "//:parser"), buildTargetPatternParser.parse(createCellRoots(filesystem), "//:parser"));
assertEquals(new SubdirectoryBuildTargetPattern(filesystem.getRootPath(), vfs.getPath("")), buildTargetPatternParser.parse(createCellRoots(filesystem), "//..."));
}
Aggregations