Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4144)

Unified Diff: chrome/install_static/install_util_unittest.cc

Issue 2031833002: Remove FilePath usage from the CrashReporterClient interface on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constant to fix clang Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/install_static/install_util.cc ('k') | chrome/installer/setup/installer_crash_reporter_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_util_unittest.cc
diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc
index 4132ac3c5f48b1764134c1175f30a454e60edeee..0af8488d2651d598c7bb37b94658c2f45a1a711a 100644
--- a/chrome/install_static/install_util_unittest.cc
+++ b/chrome/install_static/install_util_unittest.cc
@@ -66,6 +66,19 @@ TEST(InstallStaticTest, TokenizeString) {
results = TokenizeString("one|two||four", '|', false);
ASSERT_EQ(4u, results.size());
EXPECT_THAT(results, ElementsAre("one", "two", "", "four"));
+
+ // TokenizeString16 tests.
+ // Test if the string is tokenized correctly with all tokens stripped of
+ // leading and trailing spaces.
+ std::vector<base::string16> results16 =
+ TokenizeString16(L"un |deux\t|trois\n|quatre", L'|', true);
+ ASSERT_EQ(4u, results16.size());
+ EXPECT_THAT(results16, ElementsAre(L"un", L"deux", L"trois", L"quatre"));
+
+ // Test string with spaces separated by delimiters.
+ results16 = TokenizeString16(L"one|two||four", L'|', false);
+ ASSERT_EQ(4u, results16.size());
+ EXPECT_THAT(results16, ElementsAre(L"one", L"two", L"", L"four"));
}
// Tests the CompareVersionString function in the install_static library.
« no previous file with comments | « chrome/install_static/install_util.cc ('k') | chrome/installer/setup/installer_crash_reporter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698