Changeset 6ff651b for tests/check_help.c


Ignore:
Timestamp:
2019-11-19T12:51:39Z (4 years ago)
Author:
Dima <dgoldin+github@…>
Branches:
master
Children:
b504415
Parents:
bcd8f52
Message:

Fixing tests for libcheck 0.13.0

Since libcheck 0.13 it's mandatory to wrap the unit-test code
in a block. This updates the tests to comply with this.

This fix is backwards compatible with libcheck 0.12.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/check_help.c

    rbcd8f52 r6ff651b  
    88
    99START_TEST(test_help_initfree)
    10 help_t * h, *r;
    11 r = help_init(&h, "/dev/null");
    12 fail_if(r == NULL);
    13 fail_if(r != h);
     10{
     11    help_t * h, *r;
     12    r = help_init(&h, "/dev/null");
     13    fail_if(r == NULL);
     14    fail_if(r != h);
    1415
    15 help_free(&h);
    16 fail_if(h != NULL);
     16    help_free(&h);
     17    fail_if(h != NULL);
     18}
    1719END_TEST
    1820
    1921START_TEST(test_help_nonexistent)
    20 help_t * h, *r;
    21 r = help_init(&h, "/dev/null");
    22 fail_unless(help_get(&h, "nonexistent") == NULL);
    23 fail_if(r == NULL);
     22{
     23    help_t * h, *r;
     24    r = help_init(&h, "/dev/null");
     25    fail_unless(help_get(&h, "nonexistent") == NULL);
     26    fail_if(r == NULL);
     27}
    2428END_TEST
    2529
Note: See TracChangeset for help on using the changeset viewer.