CUTB
Classes | Public Member Functions | Static Public Member Functions | List of all members
cutb::Parser Class Referenceabstract

API class for parsing CUTB tests. More...

Classes

class  TestDef
 Test definition. More...
 
class  TestFile
 Test file. More...
 
class  TestGrp
 Test group. More...
 

Public Member Functions

virtual void start (const TestFile *file)
 The callback function called at the start of each file. More...
 
virtual void end (const TestFile *file)
 The callback function called at the end of each file. More...
 
virtual void start (const TestGrp *grp, const TestFile *file)
 The callback function called at the start of each test group. More...
 
virtual void end (const TestGrp *grp, const TestFile *file)
 The callback function called at the end of each test group. More...
 
virtual void at (const TestDef *testdef, const TestGrp *grp, const TestFile *file)
 The callback function called at each test definition. More...
 

Static Public Member Functions

static void parse (Parser &parser)
 Parses all test files. More...
 
static void parse (Parser &parser, const char *filepath)
 Parses a test file. More...
 

Detailed Description

API class for parsing CUTB tests.

To parse tests, first define a subclass of Parser overriding callback functions, and then call parse() with an object of the subclass. Not all the callback functions need to be overridden.

Member Function Documentation

virtual void cutb::Parser::at ( const TestDef testdef,
const TestGrp grp,
const TestFile file 
)
inlinevirtual

The callback function called at each test definition.

Parameters
testdeftest definition information
grptest group information
filefile information
virtual void cutb::Parser::end ( const TestFile file)
inlinevirtual

The callback function called at the end of each file.

Parameters
filefile information
virtual void cutb::Parser::end ( const TestGrp grp,
const TestFile file 
)
inlinevirtual

The callback function called at the end of each test group.

Parameters
grptest group information
filefile information
static void cutb::Parser::parse ( Parser parser)
static

Parses all test files.

Parameters
parseran object of a subclass of Parser
static void cutb::Parser::parse ( Parser parser,
const char *  filepath 
)
static

Parses a test file.

Parameters
parseran object of a subclass of Parser
filepaththe file path to the test file to be parsed
virtual void cutb::Parser::start ( const TestFile file)
inlinevirtual

The callback function called at the start of each file.

Parameters
filefile information
virtual void cutb::Parser::start ( const TestGrp grp,
const TestFile file 
)
inlinevirtual

The callback function called at the start of each test group.

Parameters
grptest group information
filefile information

The documentation for this class was generated from the following file: