Added tags docs

This commit is contained in:
Phil Nash 2012-11-06 19:34:10 +00:00
parent b5b1b1e430
commit 20e59ce9d1
2 changed files with 10 additions and 3 deletions

View File

@ -282,7 +282,14 @@ namespace Catch {
// subsequently wrapped lines
virtual std::string optionDescription() const {
return
"!TBD";
"This option allows one or more tags or tag patterns to be specified.\n"
"Each tag is enclosed in square brackets. A series of tags form an AND expression "
"wheras a comma seperated sequence forms an OR expression. e.g.:\n\n"
" -g [one][two],[three]\n\n"
"This matches all tests tagged [one] and [two], as well as all tests tagged [three].\n\n"
"Tags can be negated with the ~ character. This removes matching tests from the set. e.g.:\n\n"
" -g [one]~[two]\n\n"
"matches all tests tagged [one], except those also tagged [two]";
}
virtual void parseIntoConfig( const Command& cmd, ConfigData& config ) {

View File

@ -83,12 +83,12 @@ namespace Catch {
class Tag {
public:
Tag()
: m_isNegated( false )
: m_isNegated( false )
{}
Tag( const std::string& name, bool isNegated )
: m_name( name ),
m_isNegated( isNegated )
m_isNegated( isNegated )
{}
std::string getName() const {