| 127 | |
| 128 | template <typename T1, typename T2> |
| 129 | bool __CheckOptionOpImpl(const char* file, |
| 130 | const int line, |
| 131 | const bool result, |
| 132 | const T1& val1, |
| 133 | const T2& val2, |
| 134 | const char* val1_str, |
| 135 | const char* val2_str, |
| 136 | const char* op_str) { |
| 137 | if (result) { |
| 138 | return true; |
| 139 | } else { |
| 140 | LOG(ERROR) << StringPrintf("[%s:%d] Check failed: %s %s %s (%s vs. %s)", |
| 141 | __GetConstFileBaseName(file), |
| 142 | line, |
| 143 | val1_str, |
| 144 | op_str, |
| 145 | val2_str, |
| 146 | std::to_string(val1).c_str(), |
| 147 | std::to_string(val2).c_str()); |
| 148 | return false; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | inline std::string __MakeExceptionPrefix(const char* file, int line) { |
| 153 | return "[" + std::string(__GetConstFileBaseName(file)) + ":" + |
nothing calls this directly
no test coverage detected