#include "smbios/compat.h"
#include <exception>
#include <typeinfo>
Go to the source code of this file.
Classes | |
class | skip_test |
Defines | |
#define | WHEREAMI typeid(*this).name() << " (line " << __LINE__ << ")... " |
#define | GET_FLAGS() std::ios::fmtflags old_opts = cout.flags() |
#define | RESTORE_FLAGS() cout.flags(old_opts) |
#define | startTest(arg) do{GET_FLAGS(); cout << arg << WHEREAMI; RESTORE_FLAGS();}while(0) |
#define | passTest(arg) do{GET_FLAGS(); cout << "[ ok ]" << arg << endl; RESTORE_FLAGS();} while(0) |
#define | failTest(arg) do{GET_FLAGS(); cout << "[FAIL]" << arg << endl; RESTORE_FLAGS();} while(0) |
#define | skipTest(arg) do{GET_FLAGS(); cout << "[SKIP]" << arg << endl; RESTORE_FLAGS();} while(0) |
#define | STD_TEST_START_CHECKSKIP(arg) startTest(arg); bool skip=false; cout << flush; try { |
#define | STD_TEST_START(arg) startTest(arg); bool skip=false; cout << flush; try { |
#define | STD_TEST_END(arg) |
#define | ASSERT_THROWS(expr, exc) |
|
Value: do { \ bool caught = false; \ try \ { \ expr; \ } \ catch( const exc & ) \ { \ caught = true; \ } \ catch( const std::exception &e ) \ { \ ostringstream ost; \ ost << "Executed: " #expr "\nCaught wrong exception. Expected: " #exc; \ ost << "\nLine: " << __LINE__; \ ost << "\nFile: " << __FILE__; \ ost << "\nException Caught: " << typeid(e).name(); \ CPPUNIT_FAIL (ost.str().c_str()); \ } \ catch( ... ) \ { \ ostringstream ost; \ ost << "Executed: " #expr "\nCaught wrong exception. Expected: " #exc; \ ost << "\nLine: " << __LINE__; \ ost << "\nFile: " << __FILE__; \ CPPUNIT_FAIL (ost.str().c_str()); \ } \ if ( ! caught ) \ CPPUNIT_FAIL ("Executed: " #expr "\nShould have thrown an exception, but did not. Expected: " #exc);\ } while(0) Definition at line 79 of file outputctl.h. Referenced by testPlatform::testCmosWriting(), testPlatform::testConstructionOffset2(), testStandalone::testGetBoundaries(), testStandalone::testItem_GetBiosInfo(), testStandalone::testMemoryBadFiles(), testStandalone::testMemoryFuncs(), testStandalone::testNonXml(), testPlatform::testOutOfBounds(), testRbu::testRbuBadData(), and testStandalone::testTypeMismatch(). |
|
Definition at line 46 of file outputctl.h. |
|
Definition at line 41 of file outputctl.h. |
|
Definition at line 45 of file outputctl.h. |
|
Definition at line 42 of file outputctl.h. |
|
Definition at line 47 of file outputctl.h. |
|
Definition at line 44 of file outputctl.h. |
|
|
|
|
Definition at line 38 of file outputctl.h. |