MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / assertionEnded

Method assertionEnded

unittests/catch.hpp:3922–3933  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3920 void assertionStarting(AssertionInfo const&) override {}
3921
3922 bool assertionEnded(AssertionStats const& assertionStats) override {
3923 assert(!m_sectionStack.empty());
3924 // AssertionResult holds a pointer to a temporary DecomposedExpression,
3925 // which getExpandedExpression() calls to build the expression string.
3926 // Our section stack copy of the assertionResult will likely outlive the
3927 // temporary, so it must be expanded or discarded now to avoid calling
3928 // a destroyed object later.
3929 prepareExpandedExpression(const_cast<AssertionResult&>( assertionStats.assertionResult ) );
3930 SectionNode& sectionNode = *m_sectionStack.back();
3931 sectionNode.assertions.push_back(assertionStats);
3932 return true;
3933 }
3934 void sectionEnded(SectionStats const& sectionStats) override {
3935 assert(!m_sectionStack.empty());
3936 SectionNode& node = *m_sectionStack.back();

Callers

nothing calls this directly

Calls 3

backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected