MCPcopy Create free account
hub / github.com/apache/thrift / enforceNotReservedTag

Function enforceNotReservedTag

compiler/cpp/tests/catch/catch.hpp:8120–8130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8118 return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( tag[0] );
8119 }
8120 inline void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) {
8121 if( isReservedTag( tag ) ) {
8122 std::ostringstream ss;
8123 ss << Colour(Colour::Red)
8124 << "Tag name [" << tag << "] not allowed.\n"
8125 << "Tag names starting with non alpha-numeric characters are reserved\n"
8126 << Colour(Colour::FileName)
8127 << _lineInfo << '\n';
8128 throw std::runtime_error(ss.str());
8129 }
8130 }
8131
8132 TestCase makeTestCase( ITestCase* _testCase,
8133 std::string const& _className,

Callers 1

makeTestCaseFunction · 0.85

Calls 3

isReservedTagFunction · 0.85
ColourClass · 0.85
strMethod · 0.80

Tested by

no test coverage detected