diff -r 034f362af24d src/core/test.cc --- a/src/core/test.cc Mon Jan 10 15:55:29 2011 -0800 +++ b/src/core/test.cc Tue Jan 11 22:11:11 2011 -0800 @@ -21,6 +21,8 @@ #include "abort.h" #include +// Set to true to enable a segmentation fault upon a test case macro test +// failing (for debugging purposes) bool gBreakOnFailure = false; namespace ns3 { @@ -138,7 +140,7 @@ DoReportStart (); } -bool +void TestCase::Run (void) { // @@ -150,8 +152,7 @@ DoReportStart (); DoSetup (); - bool result = DoRun (); - UpdateErrorStatus (result); + DoRun (); DoTeardown (); @@ -175,7 +176,7 @@ DoReportEnd (); - return GetErrorStatus (); + return; } void @@ -682,8 +683,8 @@ // // Run the test case // - bool result = (*i)->Run (); - UpdateErrorStatus (result); + (*i)->Run (); + UpdateErrorStatus ((*i)->GetErrorStatus ()); // // Exit if we have detected an error and we are not allowing multiple filures diff -r 034f362af24d src/core/test.h --- a/src/core/test.h Mon Jan 10 15:55:29 2011 -0800 +++ b/src/core/test.h Tue Jan 11 22:11:11 2011 -0800 @@ -51,12 +51,6 @@ #define NS_TEST_SOURCEDIR \ TestCase::GetSourceDir (__FILE__) -#define NS_TEST_RETURN_IF_ERROR \ - if (GetErrorStatus ()) \ - { \ - return true; \ - } - // =========================================================================== // Test for equality (generic version) // =========================================================================== @@ -79,7 +73,7 @@ actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ if (!ContinueOnFailure ()) \ { \ - return true; \ + return; \ } \ } \ } while (false) @@ -189,7 +183,7 @@ ReportTestFailure (condStream.str (), actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ if (!ContinueOnFailure ()) \ { \ - return true; \ + return; \ } \ } \ } while (false) @@ -342,7 +336,7 @@ actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ if (!ContinueOnFailure ()) \ { \ - return true; \ + return; \ } \ } \ } while (false) @@ -447,7 +441,7 @@ actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ if (!ContinueOnFailure ()) \ { \ - return true; \ + return; \ } \ } \ } while (false) @@ -531,7 +525,7 @@ actualStream.str (), limitStream.str (), msgStream.str (), file, line); \ if (!ContinueOnFailure ()) \ { \ - return true; \ + return; \ } \ } \ } while (false) @@ -626,9 +620,8 @@ /** * \brief Run this test case. - * \returns Boolean sense of "an error has occurred." */ - bool Run (void); + void Run (void); /** * \brief Set the verbosity of this test case. @@ -829,9 +822,8 @@ /** * \internal * \brief Implementation to actually run this test case. - * \returns Boolean sense of "an error has occurred." */ - virtual bool DoRun (void) = 0; + virtual void DoRun (void) = 0; /** * \internal