- default treat_as updated to take advantage of unity's new array size options

git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@165 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
mvandervoord
2010-06-09 02:00:21 +00:00
parent 8cb956367d
commit c4b30f25ed
2 changed files with 38 additions and 9 deletions
+8 -8
View File
@@ -68,17 +68,17 @@ class CMockConfig
def standard_treat_as_map
{
'int' => 'INT',
'char' => 'INT',
'short' => 'INT',
'char' => 'INT8',
'short' => 'INT16',
'long' => 'INT',
'int8' => 'INT',
'int16' => 'INT',
'int8' => 'INT8',
'int16' => 'INT16',
'int32' => 'INT',
'int8_t' => 'INT',
'int16_t' => 'INT',
'int8_t' => 'INT8',
'int16_t' => 'INT16',
'int32_t' => 'INT',
'INT8_T' => 'INT',
'INT16_T' => 'INT',
'INT8_T' => 'INT8',
'INT16_T' => 'INT16',
'INT32_T' => 'INT',
'bool' => 'INT',
'bool_t' => 'INT',
@@ -19,13 +19,15 @@
const char * bars(void);
void no_pointers(int a, char* b);
int mixed(int a, int* b, int c);
void potential_packing_problem(short *a);
:source:
:header: |
void function_a(void);
void function_b(void);
void function_c(void);
int function_d(void);
int function_d(void);
void function_e(void);
:code: |
void function_a(void)
@@ -47,6 +49,11 @@
return mixed(6, test_list, 7);
}
void function_e(void) {
short test_list[] = {-1, -2, -3, -4};
potential_packing_problem(&test_list[1]);
}
:tests:
:common: |
void setUp(void) {}
@@ -348,5 +355,27 @@
TEST_ASSERT_EQUAL(13, function_d());
}
- :pass: TRUE
:should: 'handle a passing version of a potential packing problem (particularly try with ARM simulators)'
:code: |
test()
{
short expect_list[] = { -2, -3, -4 };
potential_packing_problem_ExpectWithArray(expect_list, 3);
function_e();
}
- :pass: FALSE
:should: 'handle a failing version of a potential packing problem (particularly try with ARM simulators)'
:code: |
test()
{
short expect_list[] = { -2, -3, 4 };
potential_packing_problem_ExpectWithArray(expect_list, 3);
function_e();
}
...