Lines Matching +full:test +full:- +full:results

2 // Use of this source code is governed by a BSD-style license that can be
19 class SplitStringIntoKeyValuePairsTest : public testing::Test {
26 ':', // Key-value delimiter in TEST_F()
27 ',', // Key-value pair delimiter in TEST_F()
34 ':', // Key-value delimiter in TEST_F()
35 ',', // Key-value pair delimiter in TEST_F()
46 ':', // Key-value delimiter in TEST_F()
47 ',', // Key-value pair delimiter in TEST_F()
58 ':', // Key-value delimiter in TEST_F()
59 ',', // Key-value pair delimiter in TEST_F()
70 ':', // Key-value delimiter in TEST_F()
71 ',', // Key-value pair delimiter in TEST_F()
82 ':', // Key-value delimiter in TEST_F()
83 ',', // Key-value pair delimiter in TEST_F()
94 ':', // Key-value delimiter in TEST_F()
95 ',', // Key-value pair delimiter in TEST_F()
104 ':', // Key-value delimiter in TEST_F()
105 ',', // Key-value pair delimiter in TEST_F()
116 ':', // Key-value delimiter in TEST_F()
117 ',', // Key-value pair delimiter in TEST_F()
129 'X', // Key-value delimiter in TEST_F()
130 'Y', // Key-value pair delimiter in TEST_F()
142 ':', // Key-value delimiter in TEST_F()
143 ',', // Key-value pair delimiter in TEST_F()
152 TEST(SplitStringUsingSubstrTest, EmptyString) { in TEST() function
153 std::vector<std::string> results = SplitStringUsingSubstr( in TEST() local
155 ASSERT_EQ(1u, results.size()); in TEST()
156 EXPECT_THAT(results, ElementsAre("")); in TEST()
159 TEST(StringUtilTest, SplitString_Basics) { in TEST() function
199 TEST(StringUtilTest, SplitString_WhitespaceAndResultType) { in TEST() function
215 // Test all 4 combinations of flags on ", ,". in TEST()
233 TEST(SplitStringUsingSubstrTest, StringWithNoDelimiter) { in TEST() function
234 std::vector<std::string> results = SplitStringUsingSubstr( in TEST() local
237 ASSERT_EQ(1u, results.size()); in TEST()
238 EXPECT_THAT(results, ElementsAre("alongwordwithnodelimiter")); in TEST()
241 TEST(SplitStringUsingSubstrTest, LeadingDelimitersSkipped) { in TEST() function
242 std::vector<std::string> results = SplitStringUsingSubstr( in TEST() local
245 ASSERT_EQ(6u, results.size()); in TEST()
246 EXPECT_THAT(results, ElementsAre("", "", "", "one", "two", "three")); in TEST()
249 TEST(SplitStringUsingSubstrTest, ConsecutiveDelimitersSkipped) { in TEST() function
250 std::vector<std::string> results = SplitStringUsingSubstr( in TEST() local
253 ASSERT_EQ(7u, results.size()); in TEST()
254 EXPECT_THAT(results, ElementsAre("uno", "", "", "dos", "tres", "", "cuatro")); in TEST()
257 TEST(SplitStringUsingSubstrTest, TrailingDelimitersSkipped) { in TEST() function
258 std::vector<std::string> results = SplitStringUsingSubstr( in TEST() local
261 ASSERT_EQ(7u, results.size()); in TEST()
263 results, ElementsAre("un", "deux", "trois", "quatre", "", "", "")); in TEST()
266 TEST(SplitStringPieceUsingSubstrTest, StringWithNoDelimiter) { in TEST() function
267 std::vector<base::StringPiece> results = in TEST() local
270 ASSERT_EQ(1u, results.size()); in TEST()
271 EXPECT_THAT(results, ElementsAre("alongwordwithnodelimiter")); in TEST()
274 TEST(SplitStringPieceUsingSubstrTest, LeadingDelimitersSkipped) { in TEST() function
275 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
278 ASSERT_EQ(6u, results.size()); in TEST()
279 EXPECT_THAT(results, ElementsAre("", "", "", "one", "two", "three")); in TEST()
282 TEST(SplitStringPieceUsingSubstrTest, ConsecutiveDelimitersSkipped) { in TEST() function
283 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
286 ASSERT_EQ(7u, results.size()); in TEST()
287 EXPECT_THAT(results, ElementsAre("uno", "", "", "dos", "tres", "", "cuatro")); in TEST()
290 TEST(SplitStringPieceUsingSubstrTest, TrailingDelimitersSkipped) { in TEST() function
291 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
294 ASSERT_EQ(7u, results.size()); in TEST()
295 EXPECT_THAT(results, in TEST()
299 TEST(SplitStringPieceUsingSubstrTest, KeepWhitespace) { in TEST() function
300 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
303 ASSERT_EQ(4u, results.size()); in TEST()
304 EXPECT_THAT(results, ElementsAre("un ", "deux\t", "trois\n", "quatre")); in TEST()
307 TEST(SplitStringPieceUsingSubstrTest, TrimWhitespace) { in TEST() function
308 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
311 ASSERT_EQ(4u, results.size()); in TEST()
312 EXPECT_THAT(results, ElementsAre("un", "deux", "trois", "quatre")); in TEST()
315 TEST(SplitStringPieceUsingSubstrTest, SplitWantAll) { in TEST() function
316 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
319 ASSERT_EQ(5u, results.size()); in TEST()
320 EXPECT_THAT(results, ElementsAre("un", "deux", "trois", "", "")); in TEST()
323 TEST(SplitStringPieceUsingSubstrTest, SplitWantNonEmpty) { in TEST() function
324 std::vector<base::StringPiece> results = SplitStringPieceUsingSubstr( in TEST() local
327 ASSERT_EQ(3u, results.size()); in TEST()
328 EXPECT_THAT(results, ElementsAre("un", "deux", "trois")); in TEST()
331 TEST(StringSplitTest, StringSplitKeepWhitespace) { in TEST() function
353 TEST(StringSplitTest, SplitStringAlongWhitespace) { in TEST() function
375 std::vector<std::string> results = base::SplitString( in TEST() local
378 ASSERT_EQ(data[i].expected_result_count, results.size()); in TEST()
380 ASSERT_EQ(data[i].output1, results[0]); in TEST()
382 ASSERT_EQ(data[i].output2, results[1]); in TEST()