Deal with more complex array length expressions. (thanks @jlindgren90 !)

This commit is contained in:
mvandervoord
2020-03-18 15:19:23 -04:00
parent 8885be7e55
commit 0f196a52cf
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1291,7 +1291,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
it "handle arrays and treat them as pointers or strings" do
source = 'void KeyOperated(CUSTOM_TYPE thing1[], int thing2 [ ], ' \
'char thing3 [][2 ][ 3], int* thing4[4], u8 thing5[((u8)5)])'
'char thing3 [][2 ][ 3], int* thing4[4], u8 thing5[((u8)((5 + 5*2)/3))])'
expected_args = [
{ type: 'CUSTOM_TYPE*', name: 'thing1', ptr?: true, const?: false, const_ptr?: false },
{ type: 'int*', name: 'thing2', ptr?: true, const?: false, const_ptr?: false },