Example #1
0
 TestCaseInfo::TestCaseInfo( ITestCase* testCase,
                             const char* name,
                             const char* description,
                             const SourceLineInfo& lineInfo )
 :   m_test( testCase ),
     m_name( name ),
     m_description( description ),
     m_lineInfo( lineInfo ),
     m_isHidden( startsWith( name, "./" ) )
 {
     TagExtracter( m_tags ).parse( m_description );
     if( hasTag( "hide" ) )
         m_isHidden = true;
 }
Example #2
0
    TestCase makeTestCase(  ITestCase* _testCase,
                            std::string const& _className,
                            std::string const& _name,
                            std::string const& _descOrTags,
                            SourceLineInfo const& _lineInfo )
    {
        std::string desc = _descOrTags;
        bool isHidden( startsWith( _name, "./" ) ); // Legacy support
        std::set<std::string> tags;
        TagExtracter( tags ).parse( desc );
        if( tags.find( "hide" ) != tags.end() || tags.find( "." ) != tags.end() )
            isHidden = true;

        TestCaseInfo info( _name, _className, desc, tags, isHidden, _lineInfo );
        return TestCase( _testCase, info );
    }