From 3f8c0c9e77bf1db24d170f302c2c7259b39fd604 Mon Sep 17 00:00:00 2001 From: Sebastian Neubauer Date: Mon, 30 Aug 2021 12:20:38 +0200 Subject: [PATCH] Add client_data and -lm to tests This fixes running ./runModuleTest.sh in the test directory. Change-Id: I77c48a51c562475a405f7589e11e66bb10a0473d --- test/cwpack_module_test.c | 8 ++++---- test/runModuleTest.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/cwpack_module_test.c b/test/cwpack_module_test.c index 3d5dab5..02717a6 100644 --- a/test/cwpack_module_test.c +++ b/test/cwpack_module_test.c @@ -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"); @@ -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"); \ @@ -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 @@ -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); diff --git a/test/runModuleTest.sh b/test/runModuleTest.sh index aa48e59..f982744 100755 --- a/test/runModuleTest.sh +++ b/test/runModuleTest.sh @@ -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