MCPcopy Create free account
hub / github.com/ReadyTalk/avian / expectSplit

Method expectSplit

test/Regex.java:47–55  ·  view source on GitHub ↗
(String regex, String string,
      String... list)

Source from the content-addressed store, hash-verified

45 }
46
47 private static void expectSplit(String regex, String string,
48 String... list)
49 {
50 String[] array = Pattern.compile(regex).split(string);
51 expect(array.length == list.length);
52 for (int i = 0; i < list.length; ++ i) {
53 expect(list[i].equals(array[i]));
54 }
55 }
56
57 public static void main(String[] args) {
58 expectMatch("a(bb)?a", "abba");

Callers 1

mainMethod · 0.95

Calls 4

compileMethod · 0.95
expectMethod · 0.95
equalsMethod · 0.65
splitMethod · 0.45

Tested by

no test coverage detected