- fixed tests from latest TEST_FAIL macro updates

git-svn-id: http://cexception.svn.sourceforge.net/svnroot/cexception/trunk@11 50f63946-2846-0410-8d77-f904c773002e
This commit is contained in:
mvandervoord
2010-07-31 16:32:17 +00:00
parent 3286a50ff8
commit 5e9361b524
2 changed files with 16 additions and 16 deletions
+15 -15
View File
@@ -20,7 +20,7 @@ void test_BasicTryDoesNothingIfNoThrow(void)
} }
Catch(e) Catch(e)
{ {
TEST_FAIL("Should Not Enter Catch If Not Thrown") TEST_FAIL_MESSAGE("Should Not Enter Catch If Not Thrown")
} }
//verify that e was untouched //verify that e was untouched
@@ -34,7 +34,7 @@ void test_BasicThrowAndCatch(void)
Try Try
{ {
Throw(0xBEEFBEEF); Throw(0xBEEFBEEF);
TEST_FAIL("Should Have Thrown An Error") TEST_FAIL_MESSAGE("Should Have Thrown An Error")
} }
Catch(e) Catch(e)
{ {
@@ -61,7 +61,7 @@ void test_BasicThrowAndCatch_WithMiniSyntax(void)
Try Try
e = 0; e = 0;
Catch(e) Catch(e)
TEST_FAIL("I shouldn't be caught because there was no throw"); TEST_FAIL_MESSAGE("I shouldn't be caught because there was no throw");
TEST_ASSERT_EQUAL(0, e); TEST_ASSERT_EQUAL(0, e);
} }
@@ -75,7 +75,7 @@ void test_VerifyVolatilesSurviveThrowAndCatch(void)
{ {
VolVal = 2; VolVal = 2;
Throw(0xBEEFBEEF); Throw(0xBEEFBEEF);
TEST_FAIL("Should Have Thrown An Error") TEST_FAIL_MESSAGE("Should Have Thrown An Error")
} }
Catch(e) Catch(e)
{ {
@@ -104,7 +104,7 @@ void test_ThrowFromASubFunctionAndCatchInRootFunc(void)
{ {
HappyExceptionThrower(0xBADDF00D); HappyExceptionThrower(0xBADDF00D);
TEST_FAIL("Should Have Thrown An Exception"); TEST_FAIL_MESSAGE("Should Have Thrown An Exception");
} }
Catch(e) Catch(e)
{ {
@@ -144,7 +144,7 @@ void test_ThrowAndCatchFromASubFunctionAndRethrowToCatchInRootFunc(void)
Try Try
{ {
HappyExceptionRethrower(0xBADDF00D); HappyExceptionRethrower(0xBADDF00D);
TEST_FAIL("Should Have Rethrown Exception"); TEST_FAIL_MESSAGE("Should Have Rethrown Exception");
} }
Catch(e) Catch(e)
{ {
@@ -165,7 +165,7 @@ void test_ThrowAndCatchFromASubFunctionAndNoRethrowToCatchInRootFunc(void)
} }
Catch(e) Catch(e)
{ {
TEST_FAIL("Should Not Have Re-thrown Error (it should have already been caught)"); TEST_FAIL_MESSAGE("Should Not Have Re-thrown Error (it should have already been caught)");
} }
//verify that THIS e is still untouched, even though subfunction was touched //verify that THIS e is still untouched, even though subfunction was touched
@@ -179,7 +179,7 @@ void test_ThrowAnErrorThenEnterATryBlockFromWithinCatch_VerifyThisDoesntCorruptE
Try Try
{ {
HappyExceptionThrower(0xBADDBEEF); HappyExceptionThrower(0xBADDBEEF);
TEST_FAIL("Should Have Thrown Exception"); TEST_FAIL_MESSAGE("Should Have Thrown Exception");
} }
Catch(e) Catch(e)
{ {
@@ -197,7 +197,7 @@ void test_ThrowAnErrorThenEnterATryBlockFromWithinCatch_VerifyThatEachExceptionI
Try Try
{ {
HappyExceptionThrower(0xBADDBEEF); HappyExceptionThrower(0xBADDBEEF);
TEST_FAIL("Should Have Thrown Exception"); TEST_FAIL_MESSAGE("Should Have Thrown Exception");
} }
Catch(e1) Catch(e1)
{ {
@@ -224,7 +224,7 @@ void test_CanHaveMultipleTryBlocksInASingleFunction(void)
Try Try
{ {
HappyExceptionThrower(0x01234567); HappyExceptionThrower(0x01234567);
TEST_FAIL("Should Have Thrown Exception"); TEST_FAIL_MESSAGE("Should Have Thrown Exception");
} }
Catch(e) Catch(e)
{ {
@@ -234,7 +234,7 @@ void test_CanHaveMultipleTryBlocksInASingleFunction(void)
Try Try
{ {
HappyExceptionThrower(0xF00D8888); HappyExceptionThrower(0xF00D8888);
TEST_FAIL("Should Have Thrown Exception"); TEST_FAIL_MESSAGE("Should Have Thrown Exception");
} }
Catch(e) Catch(e)
{ {
@@ -253,7 +253,7 @@ void test_CanHaveNestedTryBlocksInASingleFunction_ThrowInside(void)
{ {
HappyExceptionThrower(0x01234567); HappyExceptionThrower(0x01234567);
i = 1; i = 1;
TEST_FAIL("Should Have Rethrown Exception"); TEST_FAIL_MESSAGE("Should Have Rethrown Exception");
} }
Catch(e) Catch(e)
{ {
@@ -262,7 +262,7 @@ void test_CanHaveNestedTryBlocksInASingleFunction_ThrowInside(void)
} }
Catch(e) Catch(e)
{ {
TEST_FAIL("Should Have Been Caught By Inside Catch"); TEST_FAIL_MESSAGE("Should Have Been Caught By Inside Catch");
} }
} }
@@ -279,10 +279,10 @@ void test_CanHaveNestedTryBlocksInASingleFunction_ThrowOutside(void)
} }
Catch(e) Catch(e)
{ {
TEST_FAIL("Should NotBe Caught Here"); TEST_FAIL_MESSAGE("Should NotBe Caught Here");
} }
HappyExceptionThrower(0x01234567); HappyExceptionThrower(0x01234567);
TEST_FAIL("Should Have Rethrown Exception"); TEST_FAIL_MESSAGE("Should Have Rethrown Exception");
} }
Catch(e) Catch(e)
{ {
+1 -1
View File
@@ -30,7 +30,7 @@ static void runTest(UnityTestFunction test)
} }
Catch(e) Catch(e)
{ {
TEST_FAIL("Unexpected exception!") TEST_FAIL_MESSAGE("Unexpected exception!")
} }
} }
tearDown(); tearDown();