MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / execTest

Method execTest

tests/unittests/minitest.h:83–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 }
82
83 bool execTest(std::pair<std::string, bool (subclass_t::*)()> const& testRef, unsigned int iterations)
84 {
85 std::printf("%s::%s... \n", demangle_type_name(typeid(subclass_t).name()).c_str(), testRef.first.c_str());
86
87 bool result = true;
88 for (unsigned int i = 0; i != iterations; ++i) {
89 if (!(static_cast<subclass_t*>(this)->*testRef.second)()) {
90 result = false;
91 break;
92 }
93 }
94
95 if (result) {
96 std::printf(" passed\n\n");
97 }
98 else {
99 std::printf(" FAILED!\n\n");
100 }
101 return result;
102 }
103
104private:
105 static std::string demangle_type_name(const char* name)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected