for sorting tests by file/line
| 1273 | using namespace detail; |
| 1274 | // for sorting tests by file/line |
| 1275 | bool fileOrderComparator(const TestCase* lhs, const TestCase* rhs) { |
| 1276 | // this is needed because MSVC gives different case for drive letters |
| 1277 | // for __FILE__ when evaluated in a header and a source file |
| 1278 | const int res = lhs->m_file.compare(rhs->m_file, bool(DOCTEST_MSVC)); |
| 1279 | if(res != 0) |
| 1280 | return res < 0; |
| 1281 | if(lhs->m_line != rhs->m_line) |
| 1282 | return lhs->m_line < rhs->m_line; |
| 1283 | return lhs->m_template_id < rhs->m_template_id; |
| 1284 | } |
| 1285 | |
| 1286 | // for sorting tests by suite/file/line |
| 1287 | bool suiteOrderComparator(const TestCase* lhs, const TestCase* rhs) { |
no test coverage detected