PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::PLCheckTest Class Reference

The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

#include <PLCheckTest.h>

Inheritance diagram for PLearn::PLCheckTest:
Inheritance graph
[legend]
Collaboration diagram for PLearn::PLCheckTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PLCheckTest ()
 Default constructor.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual PLCheckTestdeepCopy (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 PPathdeclaringFile ()

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.

Detailed Description

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

Todo:
Write class to-do's here if there are any.
Deprecated:
Write deprecated stuff here if there is any. Indicate what else should be used instead.

Definition at line 57 of file PLCheckTest.h.


Member Typedef Documentation

Reimplemented from PLearn::PTest.

Definition at line 59 of file PLCheckTest.h.


Constructor & Destructor Documentation

PLearn::PLCheckTest::PLCheckTest ( )

Default constructor.

Definition at line 56 of file PLCheckTest.cc.

{
}

Member Function Documentation

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.

bool PLearn::PLCheckTest::_isa_ ( const Object o) [static]

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.

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.

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" );
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::PTest.

Definition at line 84 of file PLCheckTest.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines