1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-26 09:51:36 +01:00

added missing 'message' params in _MESSAGE macros; added TEST_ASSERT_NOT_EQUAL

git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@43 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
mkarlesky
2009-10-08 16:10:43 +00:00
parent 71b4f95a0a
commit 15514e7993
2 changed files with 32 additions and 3 deletions

View File

@@ -104,6 +104,21 @@ void testNotUnless(void)
TEST_ASSERT_EQUAL_INT(0U, Unity.TestFailures);
}
void testNotNotEqual(void)
{
int failed;
EXPECT_ABORT_BEGIN
TEST_ASSERT_NOT_EQUAL(10, 10);
EXPECT_ABORT_END
failed = Unity.CurrentTestFailed;
Unity.CurrentTestFailed = 0;
TEST_ASSERT_EQUAL_INT(1U, failed);
TEST_ASSERT_EQUAL_INT(0U, Unity.TestFailures);
}
void testFail(void)
{
int failed;
@@ -290,6 +305,17 @@ void testEqualUints(void)
TEST_ASSERT_EQUAL_UINT(60872u, 60872u);
}
void testNotEqual(void)
{
TEST_ASSERT_NOT_EQUAL(0, 1);
TEST_ASSERT_NOT_EQUAL(1, 0);
TEST_ASSERT_NOT_EQUAL(100, 101);
TEST_ASSERT_NOT_EQUAL(0, -1);
TEST_ASSERT_NOT_EQUAL(65535, -65535);
TEST_ASSERT_NOT_EQUAL(75, 900);
TEST_ASSERT_NOT_EQUAL(-100, -101);
}
void testEqualHex8s(void)
{
_UU8 v0, v1;