| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "gmock/gmock.h" |
| 6 |
| 7 namespace blink { |
| 8 |
| 9 class Interface { |
| 10 public: |
| 11 virtual void MyMethod(int my_param) {} |
| 12 }; |
| 13 |
| 14 class MockedInterface : public Interface { |
| 15 public: |
| 16 MOCK_METHOD1(MyMethod, void(int)); |
| 17 }; |
| 18 |
| 19 void Test() { |
| 20 MockedInterface mocked_interface; |
| 21 EXPECT_CALL(mocked_interface, MyMethod(1)); |
| 22 EXPECT_CALL( |
| 23 mocked_interface, // A comment to prevent reformatting into single line. |
| 24 MyMethod(1)); |
| 25 mocked_interface.MyMethod(123); |
| 26 } |
| 27 |
| 28 } // namespace blink |
| OLD | NEW |