aboutsummaryrefslogtreecommitdiff
path: root/tools/clang/rewrite_to_chrome_style/tests/gmock-original.cc
blob: 102bf1a46f30ed1660b242c51d37a27018e5e105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "gmock/gmock.h"

namespace blink {

class Interface {
 public:
  virtual void myMethod(int my_param) {}
};

class MockedInterface : public Interface {
 public:
  MOCK_METHOD1(myMethod, void(int));
};

void test() {
  MockedInterface mockedInterface;
  EXPECT_CALL(mockedInterface, myMethod(1));
  EXPECT_CALL(
      mockedInterface,  // A comment to prevent reformatting into single line.
      myMethod(1));
  mockedInterface.myMethod(123);
}

}  // namespace blink