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

Side by Side Diff: base/build_time_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « base/bits_unittest.cc ('k') | base/callback_helpers_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/build_time.h" 5 #include "base/build_time.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/googletest/include/gtest/gtest.h"
8 8
9 TEST(BuildTime, DateLooksValid) { 9 TEST(BuildTime, DateLooksValid) {
10 #if !defined(DONT_EMBED_BUILD_METADATA) 10 #if !defined(DONT_EMBED_BUILD_METADATA)
11 char build_date[] = __DATE__; 11 char build_date[] = __DATE__;
12 #else 12 #else
13 char build_date[] = "Sep 02 2008"; 13 char build_date[] = "Sep 02 2008";
14 #endif 14 #endif
15 15
16 EXPECT_EQ(11u, strlen(build_date)); 16 EXPECT_EQ(11u, strlen(build_date));
17 EXPECT_EQ(' ', build_date[3]); 17 EXPECT_EQ(' ', build_date[3]);
(...skipping 11 matching lines...) Expand all
29 EXPECT_EQ(':', build_time[2]); 29 EXPECT_EQ(':', build_time[2]);
30 EXPECT_EQ(':', build_time[5]); 30 EXPECT_EQ(':', build_time[5]);
31 } 31 }
32 32
33 TEST(BuildTime, DoesntCrash) { 33 TEST(BuildTime, DoesntCrash) {
34 // Since __DATE__ isn't updated unless one does a clobber build, we can't 34 // Since __DATE__ isn't updated unless one does a clobber build, we can't
35 // really test the value returned by it, except to check that it doesn't 35 // really test the value returned by it, except to check that it doesn't
36 // crash. 36 // crash.
37 base::GetBuildTime(); 37 base::GetBuildTime();
38 } 38 }
OLDNEW
« no previous file with comments | « base/bits_unittest.cc ('k') | base/callback_helpers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698