Search in sources :

Example 1 with ImmediateDirectoryBuildTargetPattern

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/..."));
}
Also used : SubdirectoryBuildTargetPattern(com.facebook.buck.model.SubdirectoryBuildTargetPattern) ImmediateDirectoryBuildTargetPattern(com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern) BuildTargetPattern(com.facebook.buck.model.BuildTargetPattern) SingletonBuildTargetPattern(com.facebook.buck.model.SingletonBuildTargetPattern) ImmediateDirectoryBuildTargetPattern(com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern) SingletonBuildTargetPattern(com.facebook.buck.model.SingletonBuildTargetPattern) SubdirectoryBuildTargetPattern(com.facebook.buck.model.SubdirectoryBuildTargetPattern) Test(org.junit.Test)

Example 2 with ImmediateDirectoryBuildTargetPattern

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), "//..."));
}
Also used : SubdirectoryBuildTargetPattern(com.facebook.buck.model.SubdirectoryBuildTargetPattern) ImmediateDirectoryBuildTargetPattern(com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern) BuildTargetPattern(com.facebook.buck.model.BuildTargetPattern) SingletonBuildTargetPattern(com.facebook.buck.model.SingletonBuildTargetPattern) ImmediateDirectoryBuildTargetPattern(com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern) SingletonBuildTargetPattern(com.facebook.buck.model.SingletonBuildTargetPattern) SubdirectoryBuildTargetPattern(com.facebook.buck.model.SubdirectoryBuildTargetPattern) Test(org.junit.Test)

Aggregations

BuildTargetPattern (com.facebook.buck.model.BuildTargetPattern)2 ImmediateDirectoryBuildTargetPattern (com.facebook.buck.model.ImmediateDirectoryBuildTargetPattern)2 SingletonBuildTargetPattern (com.facebook.buck.model.SingletonBuildTargetPattern)2 SubdirectoryBuildTargetPattern (com.facebook.buck.model.SubdirectoryBuildTargetPattern)2 Test (org.junit.Test)2