mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-10-13 04:17:24 +00:00
Rename some misnamed tests.
This commit is contained in:
+7
-11
@@ -15,7 +15,7 @@
|
|||||||
:when_ptr: :smart
|
:when_ptr: :smart
|
||||||
:plugins:
|
:plugins:
|
||||||
- :array
|
- :array
|
||||||
- :ignore_arg
|
- :expect_any_args
|
||||||
- :return_thru_ptr
|
- :return_thru_ptr
|
||||||
|
|
||||||
:systest:
|
:systest:
|
||||||
@@ -106,11 +106,10 @@
|
|||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
{
|
{
|
||||||
int r = 1, s = 2;
|
int s = 2;
|
||||||
int res = 4;
|
int res = 4;
|
||||||
|
|
||||||
ptr_ret_int_Expect(&r);
|
ptr_ret_int_ExpectAnyArgs();
|
||||||
ptr_ret_int_IgnoreArg_r();
|
|
||||||
ptr_ret_int_ReturnThruPtr_r(&res);
|
ptr_ret_int_ReturnThruPtr_r(&res);
|
||||||
ptr_ret_int(&s);
|
ptr_ret_int(&s);
|
||||||
TEST_ASSERT_EQUAL(4, s);
|
TEST_ASSERT_EQUAL(4, s);
|
||||||
@@ -124,8 +123,7 @@
|
|||||||
int r = 1;
|
int r = 1;
|
||||||
int res = 4;
|
int res = 4;
|
||||||
|
|
||||||
ptr_ret_int_Expect(NULL);
|
ptr_ret_int_ExpectAnyArgs();
|
||||||
ptr_ret_int_IgnoreArg_r();
|
|
||||||
ptr_ret_int_ReturnThruPtr_r(&res);
|
ptr_ret_int_ReturnThruPtr_r(&res);
|
||||||
ptr_ret_int(&r);
|
ptr_ret_int(&r);
|
||||||
TEST_ASSERT_EQUAL(4, r);
|
TEST_ASSERT_EQUAL(4, r);
|
||||||
@@ -230,13 +228,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- :pass: TRUE
|
- :pass: TRUE
|
||||||
:should: "generate IgnoreArg definitions"
|
:should: "generate ExpectAnyArgs definitions"
|
||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
{
|
{
|
||||||
#if !defined(ptr_ret_array_IgnoreArg_r) \
|
#if !defined(ptr_ret_array_ExpectAnyArgs)
|
||||||
|| !defined(ptr_ret_array_IgnoreArg_len) \
|
TEST_FAIL_MESSAGE("ExpectAnyArgs not defined for an argument.");
|
||||||
|| !defined(ptr_ret_const_int_IgnoreArg_s)
|
|
||||||
TEST_FAIL_MESSAGE("IgnoreArg not defined for an argument.");
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
:when_ptr: :smart
|
:when_ptr: :smart
|
||||||
:plugins:
|
:plugins:
|
||||||
- :array
|
- :array
|
||||||
- :expect_any_args
|
- :ignore_arg
|
||||||
- :return_thru_ptr
|
- :return_thru_ptr
|
||||||
|
|
||||||
:systest:
|
:systest:
|
||||||
@@ -106,10 +106,11 @@
|
|||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
{
|
{
|
||||||
int s = 2;
|
int r = 1, s = 2;
|
||||||
int res = 4;
|
int res = 4;
|
||||||
|
|
||||||
ptr_ret_int_ExpectAnyArgs();
|
ptr_ret_int_Expect(&r);
|
||||||
|
ptr_ret_int_IgnoreArg_r();
|
||||||
ptr_ret_int_ReturnThruPtr_r(&res);
|
ptr_ret_int_ReturnThruPtr_r(&res);
|
||||||
ptr_ret_int(&s);
|
ptr_ret_int(&s);
|
||||||
TEST_ASSERT_EQUAL(4, s);
|
TEST_ASSERT_EQUAL(4, s);
|
||||||
@@ -123,7 +124,8 @@
|
|||||||
int r = 1;
|
int r = 1;
|
||||||
int res = 4;
|
int res = 4;
|
||||||
|
|
||||||
ptr_ret_int_ExpectAnyArgs();
|
ptr_ret_int_Expect(NULL);
|
||||||
|
ptr_ret_int_IgnoreArg_r();
|
||||||
ptr_ret_int_ReturnThruPtr_r(&res);
|
ptr_ret_int_ReturnThruPtr_r(&res);
|
||||||
ptr_ret_int(&r);
|
ptr_ret_int(&r);
|
||||||
TEST_ASSERT_EQUAL(4, r);
|
TEST_ASSERT_EQUAL(4, r);
|
||||||
@@ -228,11 +230,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- :pass: TRUE
|
- :pass: TRUE
|
||||||
:should: "generate ExpectAnyArgs definitions"
|
:should: "generate IgnoreArg definitions"
|
||||||
:code: |
|
:code: |
|
||||||
test()
|
test()
|
||||||
{
|
{
|
||||||
#if !defined(ptr_ret_array_ExpectAnyArgs)
|
#if !defined(ptr_ret_array_IgnoreArg_r) \
|
||||||
TEST_FAIL_MESSAGE("ExpectAnyArgs not defined for an argument.");
|
|| !defined(ptr_ret_array_IgnoreArg_len) \
|
||||||
|
|| !defined(ptr_ret_const_int_IgnoreArg_s)
|
||||||
|
TEST_FAIL_MESSAGE("IgnoreArg not defined for an argument.");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user