summaryrefslogtreecommitdiffstats
path: root/base/string_util_unittest.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 13:36:31 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-16 13:36:31 +0000
commitc3272bd2a1dd23e3d2804fef1e84c60f6542ca8c (patch)
tree6513575ce1820ae729284fdc90d1f8473ae87e80 /base/string_util_unittest.cc
parentc13c49c76954d803f2c19031b9996e64adb505aa (diff)
downloadchromium_src-c3272bd2a1dd23e3d2804fef1e84c60f6542ca8c.zip
chromium_src-c3272bd2a1dd23e3d2804fef1e84c60f6542ca8c.tar.gz
chromium_src-c3272bd2a1dd23e3d2804fef1e84c60f6542ca8c.tar.bz2
base: Constantify the struct used in WprintfFormatPortabilityTest test case.
TEST=base_unittests --gtest_filter=StringUtilTest* R=willchan@chromium.org Review URL: http://codereview.chromium.org/8308007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105730 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util_unittest.cc')
-rw-r--r--base/string_util_unittest.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc
index ce8d13f..d449dee 100644
--- a/base/string_util_unittest.cc
+++ b/base/string_util_unittest.cc
@@ -1020,7 +1020,7 @@ TEST(StringUtilTest, LcpyTest) {
}
TEST(StringUtilTest, WprintfFormatPortabilityTest) {
- struct TestData {
+ static const struct {
const wchar_t* input;
bool portable;
} cases[] = {
@@ -1046,9 +1046,8 @@ TEST(StringUtilTest, WprintfFormatPortabilityTest) {
{ L"% 10s", false },
{ L"% 10ls", true }
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
EXPECT_EQ(cases[i].portable, base::IsWprintfFormatPortable(cases[i].input));
- }
}
TEST(StringUtilTest, RemoveChars) {