MCPcopy Create free account
hub / github.com/boostorg/stacktrace / main_test_loop

Function main_test_loop

test/thread_safety_checking.cpp:21–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20
21void main_test_loop() {
22 std::size_t loops = 100;
23 int Depth = 25;
24
25 boost::optional<std::pair<stacktrace, stacktrace> > ethalon;
26 std::stringstream ss_ethalon;
27
28 while (--loops) {
29 std::pair<stacktrace, stacktrace> res = function_from_library(Depth, function_from_main_translation_unit);
30 if (ethalon) {
31 BOOST_TEST(res == *ethalon);
32
33 std::stringstream ss;
34 ss << res.first;
35 BOOST_TEST(ss.str() == ss_ethalon.str());
36 } else {
37 ethalon = res;
38 ss_ethalon << ethalon->first;
39 }
40 }
41}
42
43int main() {
44 const auto t = std::chrono::steady_clock::now();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected