org.pitest.util.Glob.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中org.pitest.util.Glob.<init>()方法的一些代码示例,展示了Glob.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Glob.<init>()方法的具体详情如下:
包路径:org.pitest.util.Glob
类名称:Glob
方法名:<init>

Glob.<init>介绍

暂无

代码示例

代码示例来源:origin: hcoles/pitest

private static Glob glob(String match) {
 return new Glob(match);
}

代码示例来源:origin: hcoles/pitest

public static Function<String, Predicate<String>> toGlobPredicate() {
 return glob -> new Glob(glob);
}

代码示例来源:origin: hcoles/pitest

@Override
 public Predicate<String> apply(String a) {
  return new Glob(a.replace(".java", "").replace("/", "."));
 }
};

代码示例来源:origin: hcoles/pitest

private static void enablePowerMockSupport() {
 // Bwahahahahahahaha
 HotSwapAgent.addTransformer(new BendJavassistToMyWillTransformer(Prelude
   .or(new Glob("javassist/*")), JavassistInputStreamInterceptorAdapater.inputStreamAdapterSupplier(JavassistInterceptor.class)));
}

代码示例来源:origin: hcoles/pitest

private static void enablePowerMockSupport() {
 // Bwahahahahahahaha
 HotSwapAgent.addTransformer(new BendJavassistToMyWillTransformer(Prelude
   .or(new Glob("javassist/*")),
   JavassistInputStreamInterceptorAdapater.inputStreamAdapterSupplier(JavassistCoverageInterceptor.class)));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldNotMatchIfContentDiffersBeforeAStar() {
 final Glob glob = new Glob("org.foo.*");
 assertFalse(glob.matches("org.fo"));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldEscapeDotsInGeneratedRegex() {
 final Glob glob = new Glob("org.foo.bar");
 assertFalse(glob.matches("orgafooabar"));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldHandleEmptyStrings() {
 final Glob glob = new Glob("");
 assertTrue(glob.matches(""));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldFindExactMatches() {
 final String value = "org.foo.foo";
 final Glob glob = new Glob(value);
 assertTrue(glob.matches(value));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldNotMatchNonMatchingStringWhenNoWildcardsPresent() {
 final String value = "org.foo.foo";
 final Glob glob = new Glob("org.foo");
 assertFalse(glob.matches(value));
}

代码示例来源:origin: org.pitest/pitest

private static Glob glob(String match) {
 return new Glob(match);
}

代码示例来源:origin: org.pitest/pitest

public static Function<String, Predicate<String>> toGlobPredicate() {
 return glob -> new Glob(glob);
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldSupportQuestionMarkWildCard() {
 final Glob glob = new Glob("org?foo?bar");
 assertTrue(glob.matches("org.foo.bar"));
 assertTrue(glob.matches("orgafooabar"));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldSupportMultipleWildcards() {
 final Glob glob = new Glob("foo*bar*car");
 assertTrue(glob.matches("foo!!!bar!!!car"));
 assertFalse(glob.matches("foo!!!!!car"));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldEscapeEscapesInGeneratedRegex() {
 final Glob glob = new Glob("org.\\bar");
 assertTrue(glob.matches("org.\\bar"));
 assertFalse(glob.matches("org.bar"));
}

代码示例来源:origin: hcoles/pitest

@Test
public void shouldBeCaseSensitice() {
 final Glob glob = new Glob("foo*bar*car");
 assertTrue(glob.matches("foo!!!bar!!!car"));
 assertFalse(glob.matches("foo!!!Bar!!!car"));
}

代码示例来源:origin: org.pitest/pitest-maven

@Override
 public Predicate<String> apply(String a) {
  return new Glob(a.replace(".java", "").replace("/", "."));
 }
};

代码示例来源:origin: hcoles/pitest

@Test
public void shouldMatchEverythingAfterAStar() {
 final Glob glob = new Glob("org.foo.*");
 assertTrue(glob.matches("org.foo.foo"));
 assertTrue(glob.matches("org.foo."));
 assertTrue(glob.matches("org.foo.bar"));
}

代码示例来源:origin: org.pitest/pitest

private static void enablePowerMockSupport() {
 // Bwahahahahahahaha
 HotSwapAgent.addTransformer(new BendJavassistToMyWillTransformer(Prelude
   .or(new Glob("javassist/*")), JavassistInputStreamInterceptorAdapater.inputStreamAdapterSupplier(JavassistInterceptor.class)));
}

代码示例来源:origin: org.pitest/pitest

private static void enablePowerMockSupport() {
 // Bwahahahahahahaha
 HotSwapAgent.addTransformer(new BendJavassistToMyWillTransformer(Prelude
   .or(new Glob("javassist/*")),
   JavassistInputStreamInterceptorAdapater.inputStreamAdapterSupplier(JavassistCoverageInterceptor.class)));
}

相关文章