MCPcopy Create free account
hub / github.com/axmolengine/axmol / test_case_start_impl

Method test_case_start_impl

3rdparty/doctest/doctest.cpp:2377–2407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2375 unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }
2376
2377 void test_case_start_impl(const TestCaseData& in) {
2378 bool open_ts_tag = false;
2379 if(tc != nullptr) { // we have already opened a test suite
2380 if(std::strcmp(tc->m_test_suite, in.m_test_suite) != 0) {
2381 xml.endElement();
2382 open_ts_tag = true;
2383 }
2384 }
2385 else {
2386 open_ts_tag = true; // first test case ==> first test suite
2387 }
2388
2389 if(open_ts_tag) {
2390 xml.startElement("TestSuite");
2391 xml.writeAttribute("name", in.m_test_suite);
2392 }
2393
2394 tc = ∈
2395 xml.startElement("TestCase")
2396 .writeAttribute("name", in.m_name)
2397 .writeAttribute("filename", skipPathFromFilename(in.m_file.c_str()))
2398 .writeAttribute("line", line(in.m_line))
2399 .writeAttribute("description", in.m_description);
2400
2401 if(Approx(in.m_timeout) != 0)
2402 xml.writeAttribute("timeout", in.m_timeout);
2403 if(in.m_may_fail)
2404 xml.writeAttribute("may_fail", true);
2405 if(in.m_should_fail)
2406 xml.writeAttribute("should_fail", true);
2407 }
2408
2409 // =========================================================================================
2410 // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE

Callers

nothing calls this directly

Calls 5

skipPathFromFilenameFunction · 0.85
ApproxFunction · 0.85
endElementMethod · 0.45
startElementMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected