Lines Matching refs:prefixes

31     assertThat(prefixes("123", "1234")).containsExactly("123");  in testNewInstancesNormalized()
32 assertThat(prefixes("70x", "7[1-9]")).containsExactly("7"); in testNewInstancesNormalized()
34 assertThat(prefixes("123xxx", "123x_xxx", "567xxx", "567x_xxx")).containsExactly("123", "567"); in testNewInstancesNormalized()
39 PrefixTree prefix = prefixes("123", "124", "126", "555"); in testRetainFrom()
46 PrefixTree prefix = prefixes("123", "124", "126", "555"); in testPrefixes()
47 assertThat(prefix.prefixes(seq("1230000"))).isTrue(); in testPrefixes()
48 assertThat(prefix.prefixes(seq("555000"))).isTrue(); in testPrefixes()
49 assertThat(prefix.prefixes(seq("12"))).isFalse(); in testPrefixes()
50 assertThat(prefix.prefixes(seq("120000"))).isFalse(); in testPrefixes()
56 PrefixTree zeroLength = prefixes("xxx"); in testEmptyVsZeroLength()
73 assertThat(prefixes("123xxx", "456xx", "789x")).containsExactly("123", "456", "789"); in testNoTrailingAnyPath()
78 PrefixTree prefix = prefixes("1234"); in testRangeAndPrefixSameLength()
85 PrefixTree prefix = prefixes("1234"); in testRangeShorterThanPrefix()
92 PrefixTree prefix = prefixes("[12]", "3x4x5", "67890", "987xx9"); in testComplex()
117 assertThat(prefixes("1234").union(prefixes("12"))).containsExactly("12"); in testUnion()
119 assertThat(prefixes("12").union(prefixes("12"))).containsExactly("12"); in testUnion()
121 assertThat(prefixes("123").union(prefixes("124"))).containsExactly("12[34]"); in testUnion()
123 assertThat(prefixes("1234", "45", "800").union(prefixes("12", "4x67"))) in testUnion()
130 assertThat(prefixes("1234").intersect(prefixes("12"))).containsExactly("1234"); in testIntersection()
132 assertThat(prefixes("12").intersect(prefixes("12"))).containsExactly("12"); in testIntersection()
134 assertThat(prefixes("123").intersect(prefixes("124"))).isEmpty(); in testIntersection()
136 assertThat(prefixes("1234", "45x", "800").intersect(prefixes("12x", "4x67"))) in testIntersection()
142 assertThat(prefixes("1234").trim(3)).containsExactly("123"); in testTrim()
143 assertThat(prefixes("12").trim(3)).containsExactly("12"); in testTrim()
144 assertThat(prefixes("1234").trim(0)).containsExactly(RangeSpecification.empty()); in testTrim()
147 assertThat(prefixes("12[0-4]5", "12[5-9]").trim(3)).containsExactly("12"); in testTrim()
148 assertThat(prefixes("7001", "70[1-9]", "7[1-9]").trim(3)).containsExactly("7"); in testTrim()
206 private static PrefixTree prefixes(String... specs) { in prefixes() method in PrefixTreeTest