Coverage for /Syzygy/trace/parse/unittest_util.h

CoverageLines executed / instrumented / missingexe / inst / missLanguageGroup
85.7%12140.C++test

Line-by-line coverage:

   1    :  // Copyright 2012 Google Inc. All Rights Reserved.
   2    :  //
   3    :  // Licensed under the Apache License, Version 2.0 (the "License");
   4    :  // you may not use this file except in compliance with the License.
   5    :  // You may obtain a copy of the License at
   6    :  //
   7    :  //     http://www.apache.org/licenses/LICENSE-2.0
   8    :  //
   9    :  // Unless required by applicable law or agreed to in writing, software
  10    :  // distributed under the License is distributed on an "AS IS" BASIS,
  11    :  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12    :  // See the License for the specific language governing permissions and
  13    :  // limitations under the License.
  14    :  //
  15    :  // Call trace event parsing test classes.
  16    :  
  17    :  #ifndef SYZYGY_TRACE_PARSE_UNITTEST_UTIL_H_
  18    :  #define SYZYGY_TRACE_PARSE_UNITTEST_UTIL_H_
  19    :  
  20    :  #include "gmock/gmock.h"
  21    :  #include "syzygy/trace/parse/parser.h"
  22    :  
  23    :  namespace testing {
  24    :  
  25    :  class MockParseEventHandler : public trace::parser::ParseEventHandler {
  26    :   public:
  27    :    MOCK_METHOD3(OnProcessStarted, void(base::Time time,
  28    :                                        DWORD process_id,
  29  E :                                        const TraceSystemInfo* data));
  30  E :    MOCK_METHOD2(OnProcessEnded, void(base::Time time, DWORD process_id));
  31    :    MOCK_METHOD4(OnFunctionEntry, void(base::Time time,
  32    :                                       DWORD process_id,
  33    :                                       DWORD thread_id,
  34  E :                                       const TraceEnterExitEventData* data));
  35    :    MOCK_METHOD4(OnFunctionExit, void(base::Time time,
  36    :                                      DWORD process_id,
  37    :                                      DWORD thread_id,
  38  E :                                      const TraceEnterExitEventData* data));
  39    :    MOCK_METHOD4(OnBatchFunctionEntry, void(base::Time time,
  40    :                                            DWORD process_id,
  41    :                                            DWORD thread_id,
  42  E :                                            const TraceBatchEnterData* data));
  43    :    MOCK_METHOD4(OnProcessAttach, void(base::Time time,
  44    :                                       DWORD process_id,
  45    :                                       DWORD thread_id,
  46  E :                                       const TraceModuleData* data));
  47    :    MOCK_METHOD4(OnProcessDetach, void(base::Time time,
  48    :                                       DWORD process_id,
  49    :                                       DWORD thread_id,
  50  i :                                       const TraceModuleData* data));
  51    :    MOCK_METHOD4(OnThreadAttach, void(base::Time time,
  52    :                                      DWORD process_id,
  53    :                                      DWORD thread_id,
  54  E :                                      const TraceModuleData* data));
  55    :    MOCK_METHOD4(OnThreadDetach, void(base::Time time,
  56    :                                      DWORD process_id,
  57    :                                      DWORD thread_id,
  58  E :                                      const TraceModuleData* data));
  59    :    MOCK_METHOD5(OnInvocationBatch, void(base::Time time,
  60    :                                         DWORD process_id,
  61    :                                         DWORD thread_id,
  62    :                                         size_t num_batches,
  63  E :                                         const TraceBatchInvocationInfo* data));
  64    :    MOCK_METHOD4(OnThreadName, void(base::Time time,
  65    :                                    DWORD process_id,
  66    :                                    DWORD thread_id,
  67  E :                                    const base::StringPiece& thread_name));
  68    :    MOCK_METHOD4(OnIndexedFrequency,
  69    :                 void(base::Time time,
  70    :                      DWORD process_id,
  71    :                      DWORD thread_id,
  72  E :                      const TraceIndexedFrequencyData* data));
  73    :    MOCK_METHOD3(OnDynamicSymbol,
  74    :                 void(DWORD process_id,
  75    :                      uint32 symbol_id,
  76  E :                      const base::StringPiece& symbol_name));
  77    :    MOCK_METHOD3(OnSampleData,
  78    :                 void(base::Time time,
  79    :                      DWORD process_id,
  80  i :                      const TraceSampleData* data));
  81    :  };
  82    :  
  83    :  typedef testing::StrictMock<MockParseEventHandler> StrictMockParseEventHandler;
  84    :  
  85    :  }  // namespace testing
  86    :  
  87    :  #endif  // SYZYGY_TRACE_PARSE_UNITTEST_UTIL_H_

Coverage information generated Thu Jul 04 09:34:53 2013.