PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <PLCheckTest.h>
Public Member Functions | |
PLCheckTest () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual PLCheckTest * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
virtual void | perform () |
The method performing the test. | |
Static Public Member Functions | |
static string | _classname_ () |
static OptionList & | _getOptionList_ () |
static RemoteMethodMap & | _getRemoteMethodMap_ () |
static Object * | _new_instance_for_typemap_ () |
static bool | _isa_ (const Object *o) |
static void | _static_initialize_ () |
static const PPath & | declaringFile () |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares the class options. | |
Private Types | |
typedef PTest | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
The first sentence should be a BRIEF DESCRIPTION of what the class does.
Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html
Definition at line 57 of file PLCheckTest.h.
typedef PTest PLearn::PLCheckTest::inherited [private] |
Reimplemented from PLearn::PTest.
Definition at line 59 of file PLCheckTest.h.
PLearn::PLCheckTest::PLCheckTest | ( | ) |
string PLearn::PLCheckTest::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
OptionList & PLearn::PLCheckTest::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
RemoteMethodMap & PLearn::PLCheckTest::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
Object * PLearn::PLCheckTest::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
StaticInitializer PLCheckTest::_static_initializer_ & PLearn::PLCheckTest::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
void PLearn::PLCheckTest::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.
Reimplemented from PLearn::PTest.
Definition at line 63 of file PLCheckTest.cc.
{ inherited::build(); build_(); }
void PLearn::PLCheckTest::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::PTest.
Definition at line 89 of file PLCheckTest.cc.
{ }
string PLearn::PLCheckTest::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
void PLearn::PLCheckTest::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::PTest.
Definition at line 80 of file PLCheckTest.cc.
{ // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::PLCheckTest::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::PTest.
Definition at line 84 of file PLCheckTest.h.
:
//##### Protected Options ###############################################
PLCheckTest * PLearn::PLCheckTest::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
OptionList & PLearn::PLCheckTest::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
OptionMap & PLearn::PLCheckTest::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
RemoteMethodMap & PLearn::PLCheckTest::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::PTest.
Definition at line 51 of file PLCheckTest.cc.
void PLearn::PLCheckTest::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::PTest.
Definition at line 72 of file PLCheckTest.cc.
{ inherited::makeDeepCopyFromShallowCopy(copies); }
void PLearn::PLCheckTest::perform | ( | ) | [virtual] |
The method performing the test.
A typical test consists in some output (to pout and / or perr), and updates of this object's options.
Reimplemented from PLearn::PTest.
Definition at line 96 of file PLCheckTest.cc.
References PL_ASSERT_FUNCTION, PLCHECK, PLCHECK_MSG, and PLearn::search_replace().
{ // ### The test code should go here. int one = 1; int ein = 1; int stein = 12; // PLCHECK uses __FILE__ variable in its message, but we want the test // to have the same output, regardless of the absolute path of this file #undef __FILE__ #define __FILE__ "PLCheckTest.cc" // Similarly, PLCHECK uses __PRETTY_FUNCTION__, but we want the test to have // the same output regardless of small variations in the function display. // In particular, GCC displays the 'virtual' keyword, but not ICC. string pl_assert_func = PL_ASSERT_FUNCTION; search_replace(pl_assert_func, "virtual ", ""); #undef PL_ASSERT_FUNCTION #define PL_ASSERT_FUNCTION (pl_assert_func.c_str()) PLCHECK( one == ein ); PLCHECK_MSG( ein == stein, "ein != stein" ); }
Reimplemented from PLearn::PTest.
Definition at line 84 of file PLCheckTest.h.