Skip to content

Commit

Permalink
Merge "Add client_data and -lm to tests" into amd-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaojbao authored and Gerrit Code Review committed Sep 7, 2021
2 parents b6cf68e + 3f8c0c9 commit 39f8940
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions test/cwpack_module_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int main(int argc, const char * argv[])



cw_pack_context_init (&pack_ctx, outbuffer, 70000, 0);
cw_pack_context_init (&pack_ctx, outbuffer, 70000, 0, NULL);
if (pack_ctx.return_code == CWP_RC_WRONG_BYTE_ORDER)
{
ERROR("***** Compiled for wrong byte order, test terminated *****\n\n");
Expand Down Expand Up @@ -337,7 +337,7 @@ int main(int argc, const char * argv[])
unsigned long len = strlen(buffer)/2; \
for (ui = 0; ui < len; ui++) \
inputbuf[ui] = (uint8_t)(char2hex(buffer[2*ui])<<4) + char2hex(buffer[2*ui +1]); \
cw_unpack_context_init (&unpack_ctx, inputbuf, len+blob_length, 0); \
cw_unpack_context_init (&unpack_ctx, inputbuf, len+blob_length, 0, NULL); \
cw_unpack_next(&unpack_ctx); \
if (unpack_ctx.item.type != CWP_ITEM_##etype) \
ERROR("In unpack, type error"); \
Expand Down Expand Up @@ -453,7 +453,7 @@ int main(int argc, const char * argv[])

//******************* TEST skip ***************************

cw_pack_context_init (&pack_ctx, outbuffer, 100, 0);
cw_pack_context_init (&pack_ctx, outbuffer, 100, 0, NULL);
cw_pack_array_size(&pack_ctx,2);
cw_pack_str(&pack_ctx,"Test of skip",12); //array component
cw_pack_unsigned(&pack_ctx,0x68357); //array component
Expand All @@ -464,7 +464,7 @@ int main(int argc, const char * argv[])
}
else
{
cw_unpack_context_init (&unpack_ctx, pack_ctx.start, (unsigned long)(pack_ctx.current-pack_ctx.start), 0);
cw_unpack_context_init (&unpack_ctx, pack_ctx.start, (unsigned long)(pack_ctx.current-pack_ctx.start), 0, NULL);

cw_skip_items (&unpack_ctx, 1); /* skip whole array */
check_unpack (0x952, CWP_RC_OK);
Expand Down
2 changes: 1 addition & 1 deletion test/runModuleTest.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
clang -O3 -I ../src/ -I ../goodies/utils/ -o cwpackModuleTest cwpack_module_test.c ../src/cwpack.c ../goodies/utils/cwpack_utils.c
clang -O3 -I ../src/ -I ../goodies/utils/ -o cwpackModuleTest cwpack_module_test.c ../src/cwpack.c ../goodies/utils/cwpack_utils.c -lm
./cwpackModuleTest
rm -f *.o cwpackModuleTest

0 comments on commit 39f8940

Please sign in to comment.