lpabon / cmockery2

Reviving cmockery unit test framework from Google
Apache License 2.0
69 stars 39 forks source link

Update assert_module_test.c #17

Closed RocFang closed 9 years ago

RocFang commented 9 years ago

add stdint.h for compile problem.

lpabon commented 9 years ago

Do you mind placing here the OS and compiler which you found this issue? I have only used GCC and linux/FreeBSD systems, and have not seen this issue.

RocFang commented 9 years ago

Sure not mind. My os is CentOS release 5.5,and gcc version 4.1.2,My compile operation is below:

gcc assert_module_test.c  assert_module.c -I /usr/include/cmockery/   -lcmockery

and error info:

In file included from assert_module_test.c:19:
/usr/include/cmockery/cmockery.h:402: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:438: error: expected specifier-qualifier-list before ‘CheckParameterValue’
/usr/include/cmockery/cmockery.h:448: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mock’
/usr/include/cmockery/cmockery.h:454: error: expected ‘;’, ‘,’ or ‘)’ before ‘check_function’
/usr/include/cmockery/cmockery.h:460: error: expected ‘;’, ‘,’ or ‘)’ before ‘values’
/usr/include/cmockery/cmockery.h:464: error: expected ‘;’, ‘,’ or ‘)’ before ‘values’
/usr/include/cmockery/cmockery.h:470: error: expected ‘;’, ‘,’ or ‘)’ before ‘minimum’
/usr/include/cmockery/cmockery.h:475: error: expected ‘;’, ‘,’ or ‘)’ before ‘minimum’
/usr/include/cmockery/cmockery.h:480: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:484: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:511: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:514: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:516: error: expected ‘;’, ‘,’ or ‘)’ before ‘result’
/usr/include/cmockery/cmockery.h:520: error: expected ‘;’, ‘,’ or ‘)’ before ‘a’
/usr/include/cmockery/cmockery.h:523: error: expected ‘;’, ‘,’ or ‘)’ before ‘a’
/usr/include/cmockery/cmockery.h:536: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:539: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:542: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’
/usr/include/cmockery/cmockery.h:545: error: expected ‘;’, ‘,’ or ‘)’ before ‘value’

when i modified like that, the problem went out. I don't know if there is something wrong of my compile operation, Thank you!