diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-15 19:27:13 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-15 19:27:13 +0000 |
commit | 6d9a2eb17e0d64a35d936a958d1919ca7ea549f4 (patch) | |
tree | b080b0b7d5136adeaac594353bc2394b84919f15 /base/platform_file_unittest.cc | |
parent | 8e1845e1bc61b92e39f21da353fbec0b708e7194 (diff) | |
download | chromium_src-6d9a2eb17e0d64a35d936a958d1919ca7ea549f4.zip chromium_src-6d9a2eb17e0d64a35d936a958d1919ca7ea549f4.tar.gz chromium_src-6d9a2eb17e0d64a35d936a958d1919ca7ea549f4.tar.bz2 |
Change platform_file_unittest.cc to report the time values when an
assertion fails.
TEST=none
BUG=55517
Review URL: http://codereview.chromium.org/3428003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_file_unittest.cc')
-rw-r--r-- | base/platform_file_unittest.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/base/platform_file_unittest.cc b/base/platform_file_unittest.cc index ef42753..90fca1a 100644 --- a/base/platform_file_unittest.cc +++ b/base/platform_file_unittest.cc @@ -269,9 +269,9 @@ TEST(PlatformFile, TouchGetInfoPlatformFile) { base::Time now = base::Time::Now() + base::TimeDelta::FromSeconds(2); EXPECT_EQ(0, info.size); EXPECT_FALSE(info.is_directory); - EXPECT_TRUE(info.last_accessed <= now); - EXPECT_TRUE(info.last_modified <= now); - EXPECT_TRUE(info.creation_time <= now); + EXPECT_LE(info.last_accessed.ToInternalValue(), now.ToInternalValue()); + EXPECT_LE(info.last_modified.ToInternalValue(), now.ToInternalValue()); + EXPECT_LE(info.creation_time.ToInternalValue(), now.ToInternalValue()); base::Time creation_time = info.creation_time; // Write "test" to the file. @@ -304,11 +304,14 @@ TEST(PlatformFile, TouchGetInfoPlatformFile) { EXPECT_EQ(info.last_modified.ToTimeVal().tv_sec, new_last_modified.ToTimeVal().tv_sec); #else - EXPECT_TRUE(info.last_accessed == new_last_accessed); - EXPECT_TRUE(info.last_modified == new_last_modified); + EXPECT_EQ(info.last_accessed.ToInternalValue(), + new_last_accessed.ToInternalValue()); + EXPECT_EQ(info.last_modified.ToInternalValue(), + new_last_modified.ToInternalValue()); #endif - EXPECT_TRUE(info.creation_time == creation_time); + EXPECT_EQ(info.creation_time.ToInternalValue(), + creation_time.ToInternalValue()); // Close the file handle to allow the temp directory to be deleted. base::ClosePlatformFile(file); |