MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / fileOrderComparator

Function fileOrderComparator

tests/framework/src/doctest.cpp:1275–1284  ·  view source on GitHub ↗

for sorting tests by file/line

Source from the content-addressed store, hash-verified

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) {

Callers 1

suiteOrderComparatorFunction · 0.85

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected