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

Function enforceNoDuplicateTestCases

unittests/catch.hpp:10016–10025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10014 }
10015
10016 void enforceNoDuplicateTestCases( std::vector<TestCase> const& functions ) {
10017 std::set<TestCase> seenFunctions;
10018 for( auto const& function : functions ) {
10019 auto prev = seenFunctions.insert( function );
10020 CATCH_ENFORCE( prev.second,
10021 "error: TEST_CASE( \"" << function.name << "\" ) already defined.\n"
10022 << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << "\n"
10023 << "\tRedefined at " << function.getTestCaseInfo().lineInfo );
10024 }
10025 }
10026
10027 std::vector<TestCase> filterTests( std::vector<TestCase> const& testCases, TestSpec const& testSpec, IConfig const& config ) {
10028 std::vector<TestCase> filtered;

Callers 1

catch.hppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected