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_METHOD3(handleVersion, 33 void(const pp::SourceLocation &loc, int version, ShShaderSpec spec)); 34 }; 35 36 } // namespace angle 37 38 #endif // PREPROCESSOR_TESTS_MOCK_DIRECTIVE_HANDLER_H_ 39