MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / ~Subcase

Method ~Subcase

tests/framework/src/doctest.cpp:1153–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1151 DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations")
1152
1153 Subcase::~Subcase() {
1154 if (m_entered) {
1155 g_cs->currentSubcaseDepth--;
1156
1157 if (!g_cs->reachedLeaf) {
1158 // Leaf.
1159 g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack));
1160 g_cs->nextSubcaseStack.clear();
1161 g_cs->reachedLeaf = true;
1162 } else if (g_cs->nextSubcaseStack.empty()) {
1163 // All children are finished.
1164 g_cs->fullyTraversedSubcases.insert(hash(g_cs->subcaseStack));
1165 }
1166
1167#if defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411L && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
1168 if(std::uncaught_exceptions() > 0
1169#else
1170 if(std::uncaught_exception()
1171#endif
1172 && g_cs->shouldLogCurrentException) {
1173 DOCTEST_ITERATE_THROUGH_REPORTERS(
1174 test_case_exception, {"exception thrown in subcase - will translate later "
1175 "when the whole test case has been exited (cannot "
1176 "translate while there is an active exception)",
1177 false});
1178 g_cs->shouldLogCurrentException = false;
1179 }
1180
1181 DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);
1182 }
1183 }
1184
1185 DOCTEST_CLANG_SUPPRESS_WARNING_POP
1186 DOCTEST_GCC_SUPPRESS_WARNING_POP

Callers

nothing calls this directly

Calls 4

hashFunction · 0.70
insertMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected