| 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 | |
| 104 | private: |
| 105 | static std::string demangle_type_name(const char* name) |
nothing calls this directly
no outgoing calls
no test coverage detected