makefile::tester::Test Class Reference

Base class for tests;. More...

#include <test_util.h>

Inheritance diagram for makefile::tester::Test:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Test (const char *name_, const char *goodout_)
 Prepare the MakefileItems.
virtual ~Test ()
 Eventual cleanup.
virtual bool run ()
 Execute the test.
virtual bool precond ()
 Precondition, additional to comparing stdout, overload if necessary.
virtual bool eval ()
 Checks the result, overload if necessary.

Private Attributes

std::stringbuf makeoutbuf
 store makes output
std::stringbuf makeerrbuf
const char * name
 Test's name.
const char * goodout
 Output on stdout if test passes.
bool result

Detailed Description

Base class for tests;.

Definition at line 34 of file test_util.h.


Constructor & Destructor Documentation

makefile::tester::Test::Test ( const char *  name_,
const char *  goodout_ 
) [inline]

Prepare the MakefileItems.

Definition at line 45 of file test_util.h.

virtual makefile::tester::Test::~Test (  )  [inline, virtual]

Eventual cleanup.

Definition at line 48 of file test_util.h.


Member Function Documentation

virtual bool makefile::tester::Test::eval (  )  [inline, virtual]

Checks the result, overload if necessary.

Definition at line 57 of file test_util.h.

References goodout, makeoutbuf, precond(), and result.

Referenced by run().

virtual bool makefile::tester::Test::precond (  )  [inline, virtual]

Precondition, additional to comparing stdout, overload if necessary.

Reimplemented in makefile::tester::TestRule.

Definition at line 52 of file test_util.h.

Referenced by eval().

bool makefile::tester::Test::run (  )  [virtual]

Execute the test.

Definition at line 116 of file test_util.cpp.

References cout, eval(), makefile::tester::exec_make(), goodout, and name.

Referenced by makefile::tester::do_test().


Member Data Documentation

const char* makefile::tester::Test::goodout [private]

Output on stdout if test passes.

Definition at line 41 of file test_util.h.

Referenced by eval(), and run().

std::stringbuf makefile::tester::Test::makeerrbuf [private]

Definition at line 37 of file test_util.h.

std::stringbuf makefile::tester::Test::makeoutbuf [private]

store makes output

Definition at line 37 of file test_util.h.

Referenced by eval().

const char* makefile::tester::Test::name [private]

Test's name.

Definition at line 39 of file test_util.h.

Referenced by run().

bool makefile::tester::Test::result [private]

Definition at line 42 of file test_util.h.

Referenced by eval().


The documentation for this class was generated from the following files:
Generated on 1 Nov 2014 for Hugintrunk by  doxygen 1.4.7