Lines Matching refs:Parse
40 RangeSet rs = RangeSet::Parse("2,1,10"); in TEST()
45 RangeSet rs2 = RangeSet::Parse("4,15,20,1,10"); in TEST()
52 ASSERT_EQ(rs, RangeSet::Parse(" 2, 1, 10")); in TEST()
53 ASSERT_FALSE(RangeSet::Parse("2,1,10 ")); in TEST()
58 ASSERT_FALSE(RangeSet::Parse("")); in TEST()
59 ASSERT_FALSE(RangeSet::Parse("2,1")); in TEST()
62 ASSERT_FALSE(RangeSet::Parse("a,1,1")); in TEST()
63 ASSERT_FALSE(RangeSet::Parse("3,1,1")); in TEST()
64 ASSERT_FALSE(RangeSet::Parse("-3,1,1")); in TEST()
65 ASSERT_FALSE(RangeSet::Parse("2,1,2,3")); in TEST()
68 ASSERT_FALSE(RangeSet::Parse("2,1,10a")); in TEST()
69 ASSERT_FALSE(RangeSet::Parse("2,,10")); in TEST()
72 ASSERT_FALSE(RangeSet::Parse("2,2,2")); in TEST()
73 ASSERT_FALSE(RangeSet::Parse("2,2,1")); in TEST()
77 RangeSet rs = RangeSet::Parse("2,1,6"); in TEST()
92 ASSERT_EQ(RangeSet::Parse("2,3,5"), rs); in TEST()
95 ASSERT_EQ(RangeSet::Parse("4,3,5,5,15"), rs); in TEST()
110 ASSERT_EQ(RangeSet::Parse("2,5,15"), rs); in TEST()
114 RangeSet r1 = RangeSet::Parse("2,1,6"); in TEST()
115 RangeSet r2 = RangeSet::Parse("2,5,10"); in TEST()
119 r2 = RangeSet::Parse("2,6,10"); in TEST()
123 ASSERT_FALSE(RangeSet::Parse("2,3,5").Overlaps(RangeSet::Parse("2,5,7"))); in TEST()
124 ASSERT_FALSE(RangeSet::Parse("2,5,7").Overlaps(RangeSet::Parse("2,3,5"))); in TEST()
128 RangeSet rs1 = RangeSet::Parse("2,1,2"); in TEST()
130 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,1,2") }), rs1.Split(1)); in TEST()
132 RangeSet rs2 = RangeSet::Parse("2,5,10"); in TEST()
134 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,5,8"), RangeSet::Parse("2,8,10") }), in TEST()
137 RangeSet rs3 = RangeSet::Parse("4,0,1,5,10"); in TEST()
139 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("4,0,1,5,7"), RangeSet::Parse("2,7,10") }), in TEST()
142 RangeSet rs4 = RangeSet::Parse("6,1,3,3,4,4,5"); in TEST()
144 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,1,3"), RangeSet::Parse("2,3,4"), in TEST()
145 RangeSet::Parse("2,4,5") }), in TEST()
148 RangeSet rs5 = RangeSet::Parse("2,0,10"); in TEST()
150 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,0,3"), RangeSet::Parse("2,3,6"), in TEST()
151 RangeSet::Parse("2,6,8"), RangeSet::Parse("2,8,10") }), in TEST()
154 RangeSet rs6 = RangeSet::Parse( in TEST()
162 RangeSet::Parse("12,0,268,269,271,286,447,8350,32770,33022,98306,98558,118472"), in TEST()
163 RangeSet::Parse("8,118472,163842,164094,196609,204800,229378,229630,237216"), in TEST()
164 RangeSet::Parse("4,237216,294914,295166,347516"), RangeSet::Parse("2,347516,457564") }), in TEST()
181 RangeSet rs2 = RangeSet::Parse("2,1,5"); in TEST()
186 RangeSet rs3 = RangeSet::Parse("2,1,5"); in TEST()
188 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,1,2"), RangeSet::Parse("2,2,3"), in TEST()
189 RangeSet::Parse("2,3,4"), RangeSet::Parse("2,4,5") }), in TEST()
193 RangeSet rs4 = RangeSet::Parse("2,1,5"); in TEST()
195 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,1,2"), RangeSet::Parse("2,2,3"), in TEST()
196 RangeSet::Parse("2,3,4"), RangeSet::Parse("2,4,5") }), in TEST()
200 RangeSet rs5 = RangeSet::Parse("2,0,3"); in TEST()
202 ASSERT_EQ((std::vector<RangeSet>{ RangeSet::Parse("2,0,1"), RangeSet::Parse("2,1,2"), in TEST()
203 RangeSet::Parse("2,2,3") }), in TEST()
208 RangeSet rs = RangeSet::Parse("2,1,10"); in TEST()
219 ASSERT_EQ(RangeSet::Parse("2,1,6"), RangeSet::Parse("2,1,6")); in TEST()
221 ASSERT_NE(RangeSet::Parse("2,1,6"), RangeSet::Parse("2,1,7")); in TEST()
222 ASSERT_NE(RangeSet::Parse("2,1,6"), RangeSet::Parse("2,2,7")); in TEST()
225 ASSERT_NE(RangeSet::Parse("4,1,5,8,10"), RangeSet::Parse("4,8,10,1,5")); in TEST()
229 RangeSet rs = RangeSet::Parse("4,1,5,8,10"); in TEST()
246 ASSERT_EQ("", RangeSet::Parse("").ToString()); in TEST()
247 ASSERT_EQ("2,1,6", RangeSet::Parse("2,1,6").ToString()); in TEST()
248 ASSERT_EQ("4,1,5,8,10", RangeSet::Parse("4,1,5,8,10").ToString()); in TEST()
249 ASSERT_EQ("6,1,3,4,6,15,22", RangeSet::Parse("6,1,3,4,6,15,22").ToString()); in TEST()