#include "smbios/compat.h"
#include <exception>
#include <typeinfo>
Go to the source code of this file.
Classes | |
class | skip_test |
Defines | |
#define | WHEREAMI "%s (line %d)... ", typeid(*this).name(), __LINE__ |
#define | startTest(arg1, arg2) do{ printf(arg1, arg2); printf(WHEREAMI) ;}while(0) |
#define | passTest() do {printf( "[ ok ]\n" ); } while(0) |
#define | failTest() do {printf( "[FAIL]\n" ); } while(0) |
#define | skipTest() do {printf( "[SKIP]\n" ); } while(0) |
#define | STD_TEST_START(arg1, arg2) startTest(arg1, arg2); bool skip=false; cout << flush; try { |
#define | STD_TEST_END() |
#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 74 of file outputctl.h. Referenced by testSmbiosXml::testCmosWriting(), testSmbiosXml::testGetBoundaries(), testSmbiosXml::testOutOfBounds(), and testSmbiosXml::testTypeMismatch(). |
|
Definition at line 43 of file outputctl.h. |
|
Definition at line 42 of file outputctl.h. |
|
Definition at line 44 of file outputctl.h. |
|
Definition at line 41 of file outputctl.h. |
|
|
|
Definition at line 38 of file outputctl.h. |