#A Assert function taking function, line, condition, and message
| 7 | // #A Assert function taking function, line, condition, and |
| 8 | // message |
| 9 | void Assert(bool condition, |
| 10 | std::string_view msg, |
| 11 | std::string_view function, |
| 12 | int line) |
| 13 | { |
| 14 | if(not condition) { |
| 15 | std::clog << function << ':' |
| 16 | << line // #B followed by function and line |
| 17 | << ": " << msg // #C and the message |
| 18 | << '\n'; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | // #D Macro wrapper to call Assert |
| 23 | #define ASSERT(condition, msg) \ |
nothing calls this directly
no outgoing calls
no test coverage detected