xref: /aosp_15_r20/external/angle/src/tests/preprocessor_tests/MockDirectiveHandler.h (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1 //
2 // Copyright 2012 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 #ifndef PREPROCESSOR_TESTS_MOCK_DIRECTIVE_HANDLER_H_
8 #define PREPROCESSOR_TESTS_MOCK_DIRECTIVE_HANDLER_H_
9 
10 #include "compiler/preprocessor/DirectiveHandlerBase.h"
11 #include "gmock/gmock.h"
12 
13 namespace angle
14 {
15 
16 class MockDirectiveHandler : public pp::DirectiveHandler
17 {
18   public:
19     MOCK_METHOD2(handleError, void(const pp::SourceLocation &loc, const std::string &msg));
20 
21     MOCK_METHOD4(handlePragma,
22                  void(const pp::SourceLocation &loc,
23                       const std::string &name,
24                       const std::string &value,
25                       bool stdgl));
26 
27     MOCK_METHOD3(handleExtension,
28                  void(const pp::SourceLocation &loc,
29                       const std::string &name,
30                       const std::string &behavior));
31 
32     MOCK_METHOD4(handleVersion,
33                  void(const pp::SourceLocation &loc,
34                       int version,
35                       ShShaderSpec spec,
36                       pp::MacroSet *macro_set));
37 };
38 
39 }  // namespace angle
40 
41 #endif  // PREPROCESSOR_TESTS_MOCK_DIRECTIVE_HANDLER_H_
42