Coverage Report

Created: 2024-09-19 09:45

/proc/self/cwd/test/test_common/global.cc
Line
Count
Source (jump to first uncovered line)
1
#include "test/test_common/global.h"
2
3
#include "source/common/common/assert.h"
4
5
namespace Envoy {
6
namespace Test {
7
8
4.98M
Globals& Globals::instance() {
9
4.98M
  static Globals* globals = new Globals;
10
4.98M
  return *globals;
11
4.98M
}
12
13
0
std::string Globals::describeActiveSingletonsHelper() {
14
0
  std::string ret;
15
0
  Thread::ReleasableLockGuard map_lock(map_mutex_);
16
0
  for (auto& p : singleton_map_) {
17
0
    SingletonSharedPtr singleton = p.second.lock();
18
0
    if (singleton != nullptr) {
19
0
      absl::StrAppend(&ret, "Unexpected active singleton: ", p.first, "\n");
20
0
    }
21
0
  }
22
0
  return ret;
23
0
}
24
25
} // namespace Test
26
} // namespace Envoy