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

Side by Side Diff: base/gmock_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/files/scoped_temp_dir_unittest.cc ('k') | base/gtest_prod_util.h » ('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) 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 // This test is a simple sanity check to make sure gmock is able to build/link 5 // This test is a simple sanity check to make sure gmock is able to build/link
6 // correctly. It just instantiates a mock object and runs through a couple of 6 // correctly. It just instantiates a mock object and runs through a couple of
7 // the basic mock features. 7 // the basic mock features.
8 8
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gtest/googlemock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/googletest/include/gtest/gtest.h"
11 11
12 // Gmock matchers and actions that we use below. 12 // Gmock matchers and actions that we use below.
13 using testing::AnyOf; 13 using testing::AnyOf;
14 using testing::Eq; 14 using testing::Eq;
15 using testing::Return; 15 using testing::Return;
16 using testing::SetArgumentPointee; 16 using testing::SetArgumentPointee;
17 using testing::WithArg; 17 using testing::WithArg;
18 using testing::_; 18 using testing::_;
19 19
20 namespace { 20 namespace {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EXPECT_CALL(mock, ReturnSecond(_, AnyOf(Eq(4), Eq(5)))) 128 EXPECT_CALL(mock, ReturnSecond(_, AnyOf(Eq(4), Eq(5))))
129 .WillRepeatedly(WithArg<1>(ReturnVal())); 129 .WillRepeatedly(WithArg<1>(ReturnVal()));
130 EXPECT_EQ(4, mock.ReturnSecond(-1, 4)); 130 EXPECT_EQ(4, mock.ReturnSecond(-1, 4));
131 EXPECT_EQ(5, mock.ReturnSecond(0, 5)); 131 EXPECT_EQ(5, mock.ReturnSecond(0, 5));
132 EXPECT_EQ(4, mock.ReturnSecond(0xdeadbeef, 4)); 132 EXPECT_EQ(4, mock.ReturnSecond(0xdeadbeef, 4));
133 EXPECT_EQ(4, mock.ReturnSecond(112358, 4)); 133 EXPECT_EQ(4, mock.ReturnSecond(112358, 4));
134 EXPECT_EQ(5, mock.ReturnSecond(1337, 5)); 134 EXPECT_EQ(5, mock.ReturnSecond(1337, 5));
135 } 135 }
136 136
137 } // namespace 137 } // namespace
OLDNEW
« no previous file with comments | « base/files/scoped_temp_dir_unittest.cc ('k') | base/gtest_prod_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698