OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/sync/notifier/base/time.h" | 5 #include "chrome/browser/sync/notifier/base/time.h" |
6 #include "notifier/testing/notifier/unittest.h" | |
7 | 6 |
8 namespace notifier { | 7 namespace notifier { |
9 | 8 |
10 TEST_NOTIFIER_F(TimeTest); | 9 TEST_NOTIFIER_F(TimeTest); |
11 | 10 |
12 TEST_F(TimeTest, ParseRFC822DateTime) { | 11 TEST_F(TimeTest, ParseRFC822DateTime) { |
13 struct tm t = {0}; | 12 struct tm t = {0}; |
14 | 13 |
15 EXPECT_TRUE(ParseRFC822DateTime("Mon, 16 May 2005 15:44:18 -0700", | 14 EXPECT_TRUE(ParseRFC822DateTime("Mon, 16 May 2005 15:44:18 -0700", |
16 &t, false)); | 15 &t, false)); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 63 |
65 EXPECT_FALSE(ParseStringToTimeSpan("2:invalid:4", &time_span)); | 64 EXPECT_FALSE(ParseStringToTimeSpan("2:invalid:4", &time_span)); |
66 } | 65 } |
67 | 66 |
68 TEST_F(TimeTest, UseLocalTimeAsString) { | 67 TEST_F(TimeTest, UseLocalTimeAsString) { |
69 // Just call it to ensure that it doesn't assert. | 68 // Just call it to ensure that it doesn't assert. |
70 GetLocalTimeAsString(); | 69 GetLocalTimeAsString(); |
71 } | 70 } |
72 | 71 |
73 } // namespace notifier | 72 } // namespace notifier |
OLD | NEW |