PLearn 0.1
|
#include "PPathTest.h"
#include <plearn/io/PPath.h>
#include <plearn/io/pl_log.h>
#include <plearn/base/stringutils.h>
Go to the source code of this file.
Namespaces | |
namespace | PLearn |
< for swap | |
Defines | |
#define | WIDTH 60 |
#define | PRINT_TEST(str, __test) |
#define | ASSERT(str, __test) |
void singleAssert(const string& p) { Path path(p); PRINT_TEST( p, p.up() ); PRINT_TEST( p, p.dirname() ); PRINT_TEST( p, p.basename() ); } | |
Functions | |
void | PLearn::split_behavior (const string &test, const string &dos, const string &posix) |
string | PLearn::boolstr (bool b) |
void | PLearn::backslashes () |
void | PLearn::absolute_path () |
void | PLearn::someAsserts () |
void | PLearn::canonical () |
void relativePathAsserts(); { PPath home_ = PPath::home(); PPath cwd = PPath::getcwd(); | |
void | PLearn::unitTest (const string &p) |
Definition in file PPathTest.cc.
#define ASSERT | ( | str, | |
__test | |||
) |
MAND_LOG\ << left(str, WIDTH) << flush;\ try {\ bool __result = (__test);\ string __success;\ if ( __result ) __success = "True";\ else __success = "False";\ MAND_LOG << __success << endl << endl;\ }\ catch(const PLearnError& e)\ {\ perr << "FATAL ERROR: " << e.message() << endl << endl;\ }\ catch (...)\ {\ perr << "FATAL ERROR: uncaught unknown exception" << endl << endl;\ }
void singleAssert(const string& p) { Path path(p); PRINT_TEST( p, p.up() ); PRINT_TEST( p, p.dirname() ); PRINT_TEST( p, p.basename() ); }
Definition at line 148 of file PPathTest.cc.
#define PRINT_TEST | ( | str, | |
__test | |||
) |
MAND_LOG\ << left(str, WIDTH) << flush;\ try {\ MAND_LOG << (__test) << endl << endl;\ }\ catch(const PLearnError& e)\ {\ perr << "FATAL ERROR: " << e.message() << endl << endl;\ }\ catch (...)\ {\ perr << "FATAL ERROR: uncaught unknown exception" << endl << endl;\ }
Definition at line 133 of file PPathTest.cc.
Referenced by PLearn::canonical().
#define WIDTH 60 |
Definition at line 132 of file PPathTest.cc.