Mercurial > hg > th-libs
comparison tests.c @ 771:c17eadc60c3d
Rename th_ioctx struct to th_ioctx_t, for consistency. Breaks API.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Feb 2023 23:33:45 +0200 |
parents | 600a3c08747f |
children | 08bbfb5239fc |
comparison
equal
deleted
inserted
replaced
770:79f888e4616f | 771:c17eadc60c3d |
---|---|
49 char buf1[SET_BUF_SIZE_2], | 49 char buf1[SET_BUF_SIZE_2], |
50 buf2[SET_BUF_SIZE_2]; | 50 buf2[SET_BUF_SIZE_2]; |
51 | 51 |
52 int optFlags = TST_ALL; | 52 int optFlags = TST_ALL; |
53 | 53 |
54 th_ioctx testio; | 54 th_ioctx_t testio; |
55 | 55 |
56 | 56 |
57 // Define option arguments | 57 // Define option arguments |
58 static const th_optarg arg_opts[] = | 58 static const th_optarg arg_opts[] = |
59 { | 59 { |
409 break; | 409 break; |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
413 | 413 |
414 void test_ioctx_error(th_ioctx *fh, const int val, const char *msg) | 414 void test_ioctx_error(th_ioctx_t *fh, const int val, const char *msg) |
415 { | 415 { |
416 (void) fh; | 416 (void) fh; |
417 (void) val; | 417 (void) val; |
418 tprint(0, "IOCTX ERROR: %s", msg); | 418 tprint(0, "IOCTX ERROR: %s", msg); |
419 } | 419 } |
420 | 420 |
421 | 421 |
422 void test_ioctx_msg(th_ioctx *fh, const int val, const char *msg) | 422 void test_ioctx_msg(th_ioctx_t *fh, const int val, const char *msg) |
423 { | 423 { |
424 (void) fh; | 424 (void) fh; |
425 (void) val; | 425 (void) val; |
426 tprint(1, "IOCTX MSG: %s", msg); | 426 tprint(1, "IOCTX MSG: %s", msg); |
427 } | 427 } |
440 | 440 |
441 | 441 |
442 void test_config_read(th_cfgitem_t *cfg, const char *filename) | 442 void test_config_read(th_cfgitem_t *cfg, const char *filename) |
443 { | 443 { |
444 int nsubtest; | 444 int nsubtest; |
445 th_ioctx *fh = NULL; | 445 th_ioctx_t *fh = NULL; |
446 test_ctx ctx; | 446 test_ctx ctx; |
447 th_cfgitem_t *item; | 447 th_cfgitem_t *item; |
448 | 448 |
449 tprint(1, "Reading configuration from '%s'.\n", filename); | 449 tprint(1, "Reading configuration from '%s'.\n", filename); |
450 | 450 |
499 | 499 |
500 void test_config_file(void) | 500 void test_config_file(void) |
501 { | 501 { |
502 static const char *filename = "cfg.temp"; | 502 static const char *filename = "cfg.temp"; |
503 test_ctx ctx; | 503 test_ctx ctx; |
504 th_ioctx *fh = NULL; | 504 th_ioctx_t *fh = NULL; |
505 th_cfgitem_t *sect1, *sect2, *cfg = NULL, *item; | 505 th_cfgitem_t *sect1, *sect2, *cfg = NULL, *item; |
506 char *v_str1 = NULL; | 506 char *v_str1 = NULL; |
507 unsigned int v_uint1; | 507 unsigned int v_uint1; |
508 int v_int1; | 508 int v_int1; |
509 bool v_bool1, v_bool2; | 509 bool v_bool1, v_bool2; |