summaryrefslogtreecommitdiffstats
path: root/base
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
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')
-rw-r--r--base/string_util_unittest.cc5
-rw-r--r--base/threading/worker_pool_posix.cc2
-rw-r--r--base/tracked_objects_unittest.cc6
3 files changed, 6 insertions, 7 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) {
diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc
index b6c30e5..ea1cc48 100644
--- a/base/threading/worker_pool_posix.cc
+++ b/base/threading/worker_pool_posix.cc
@@ -94,7 +94,7 @@ void WorkerThread::ThreadMain() {
pending_task.task.Run();
#if defined(TRACK_ALL_TASK_OBJECTS)
tracked_objects::ThreadData::TallyADeathIfActive(pending_task.post_births,
- pending_task.time_posted, TimeTicks::TimeTicks(), start_of_run);
+ pending_task.time_posted, TimeTicks(), start_of_run);
#endif // defined(TRACK_ALL_TASK_OBJECTS)
}
diff --git a/base/tracked_objects_unittest.cc b/base/tracked_objects_unittest.cc
index c9ab9682..9c4c60a 100644
--- a/base/tracked_objects_unittest.cc
+++ b/base/tracked_objects_unittest.cc
@@ -78,9 +78,9 @@ TEST_F(TrackedObjectsTest, TinyStartupShutdown) {
const Births* second_birth = ThreadData::TallyABirthIfActive(location);
ThreadData::TallyADeathIfActive(
second_birth,
- base::TimeTicks::TimeTicks(), /* Bogus post_time. */
- base::TimeTicks::TimeTicks(), /* Bogus delayed_start_time. */
- base::TimeTicks::TimeTicks() /* Bogus start_run_time. */);
+ base::TimeTicks(), /* Bogus post_time. */
+ base::TimeTicks(), /* Bogus delayed_start_time. */
+ base::TimeTicks() /* Bogus start_run_time. */);
birth_map.clear();
data->SnapshotBirthMap(&birth_map);