Coverage Report

Created: 2024-09-19 09:45

/proc/self/cwd/test/mocks/thread_local/mocks.cc
Line
Count
Source
1
#include "mocks.h"
2
3
#include "gmock/gmock.h"
4
#include "gtest/gtest.h"
5
6
using testing::_;
7
using testing::Invoke;
8
using testing::ReturnRef;
9
10
namespace Envoy {
11
namespace ThreadLocal {
12
13
68.8k
MockInstance::MockInstance() {
14
68.8k
  ON_CALL(*this, allocateSlot()).WillByDefault(Invoke(this, &MockInstance::allocateSlotMock));
15
68.8k
  ON_CALL(*this, runOnAllThreads(_)).WillByDefault(Invoke(this, &MockInstance::runOnAllThreads1));
16
68.8k
  ON_CALL(*this, runOnAllThreads(_, _))
17
68.8k
      .WillByDefault(Invoke(this, &MockInstance::runOnAllThreads2));
18
68.8k
  ON_CALL(*this, shutdownThread()).WillByDefault(Invoke(this, &MockInstance::shutdownThread_));
19
68.8k
  ON_CALL(*this, dispatcher()).WillByDefault(ReturnRef(*dispatcher_ptr_));
20
68.8k
}
21
22
68.8k
MockInstance::~MockInstance() { shutdownThread_(); }
23
24
} // namespace ThreadLocal
25
} // namespace Envoy