Changeset 3bacee1 in mainline for uspace/lib/pcut/tests


Ignore:
Timestamp:
2018-04-12T16:27:17Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3cf22f9
Parents:
76d0981d
git-author:
Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
git-committer:
Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
Message:

Make ccheck-fix again and commit more good files.

Location:
uspace/lib/pcut/tests
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/tests/abort.c

    r76d0981d r3bacee1  
    3232PCUT_INIT;
    3333
    34 PCUT_TEST(access_null_pointer) {
     34PCUT_TEST(access_null_pointer)
     35{
    3536        abort();
    3637}
  • uspace/lib/pcut/tests/asserts.c

    r76d0981d r3bacee1  
    3232PCUT_INIT;
    3333
    34 PCUT_TEST(int_equals) {
     34PCUT_TEST(int_equals)
     35{
    3536        PCUT_ASSERT_INT_EQUALS(1, 1);
    3637        PCUT_ASSERT_INT_EQUALS(1, 0);
    3738}
    3839
    39 PCUT_TEST(double_equals) {
     40PCUT_TEST(double_equals)
     41{
    4042        PCUT_ASSERT_DOUBLE_EQUALS(1., 1., 0.001);
    4143        PCUT_ASSERT_DOUBLE_EQUALS(1., 0.5, 0.4);
    4244}
    4345
    44 PCUT_TEST(str_equals) {
     46PCUT_TEST(str_equals)
     47{
    4548        PCUT_ASSERT_STR_EQUALS("xyz", "xyz");
    4649        PCUT_ASSERT_STR_EQUALS("abc", "xyz");
    4750}
    4851
    49 PCUT_TEST(str_equals_or_null_base) {
     52PCUT_TEST(str_equals_or_null_base)
     53{
    5054        PCUT_ASSERT_STR_EQUALS_OR_NULL("xyz", "xyz");
    5155}
    5256
    53 PCUT_TEST(str_equals_or_null_different) {
     57PCUT_TEST(str_equals_or_null_different)
     58{
    5459        PCUT_ASSERT_STR_EQUALS_OR_NULL("abc", "xyz");
    5560}
    5661
    57 PCUT_TEST(str_equals_or_null_one_null) {
     62PCUT_TEST(str_equals_or_null_one_null)
     63{
    5864        PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, "xyz");
    5965}
    6066
    61 PCUT_TEST(str_equals_or_null_both) {
     67PCUT_TEST(str_equals_or_null_both)
     68{
    6269        PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, NULL);
    6370}
    6471
    65 PCUT_TEST(assert_true) {
     72PCUT_TEST(assert_true)
     73{
    6674        PCUT_ASSERT_TRUE(42);
    6775        PCUT_ASSERT_TRUE(0);
    6876}
    6977
    70 PCUT_TEST(assert_false) {
     78PCUT_TEST(assert_false)
     79{
    7180        PCUT_ASSERT_FALSE(0);
    7281        PCUT_ASSERT_FALSE(42);
  • uspace/lib/pcut/tests/beforeafter.c

    r76d0981d r3bacee1  
    4949PCUT_TEST_SUITE(suite_with_setup_and_teardown);
    5050
    51 PCUT_TEST_BEFORE {
     51PCUT_TEST_BEFORE
     52{
    5253        buffer = malloc(BUFFER_SIZE);
    5354        PCUT_ASSERT_NOT_NULL(buffer);
    5455}
    5556
    56 PCUT_TEST_AFTER {
     57PCUT_TEST_AFTER
     58{
    5759        free(buffer);
    5860        buffer = NULL;
    5961}
    6062
    61 PCUT_TEST(test_with_setup_and_teardown) {
     63PCUT_TEST(test_with_setup_and_teardown)
     64{
    6265        snprintf(buffer, BUFFER_SIZE - 1, "%d-%s", 56, "abcd");
    6366        PCUT_ASSERT_STR_EQUALS("56-abcd", buffer);
     
    6669PCUT_TEST_SUITE(another_without_setup);
    6770
    68 PCUT_TEST(test_without_any_setup_or_teardown) {
     71PCUT_TEST(test_without_any_setup_or_teardown)
     72{
    6973        PCUT_ASSERT_NULL(buffer);
    7074}
  • uspace/lib/pcut/tests/errno.c

    r76d0981d r3bacee1  
    3737PCUT_INIT;
    3838
    39 PCUT_TEST(errno_value) {
     39PCUT_TEST(errno_value)
     40{
    4041        errno_t value = EOK;
    4142        PCUT_ASSERT_ERRNO_VAL(EOK, value);
     
    4748}
    4849
    49 PCUT_TEST(errno_variable) {
     50PCUT_TEST(errno_variable)
     51{
    5052        errno = ENOENT;
    5153        PCUT_ASSERT_ERRNO(ENOENT);
  • uspace/lib/pcut/tests/inithook.c

    r76d0981d r3bacee1  
    3434static int init_counter = 0;
    3535
    36 static void init_hook(void) {
     36static void init_hook(void)
     37{
    3738        init_counter++;
    3839}
    3940
    40 PCUT_TEST_BEFORE {
     41PCUT_TEST_BEFORE
     42{
    4143        PCUT_ASSERT_INT_EQUALS(1, init_counter);
    4244        init_counter++;
    4345}
    4446
    45 PCUT_TEST(check_init_counter) {
     47PCUT_TEST(check_init_counter)
     48{
    4649        PCUT_ASSERT_INT_EQUALS(2, init_counter);
    4750}
    4851
    49 PCUT_TEST(check_init_counter_2) {
     52PCUT_TEST(check_init_counter_2)
     53{
    5054        PCUT_ASSERT_INT_EQUALS(2, init_counter);
    5155}
    5256
    5357
    54 PCUT_CUSTOM_MAIN(
    55         PCUT_MAIN_SET_INIT_HOOK(init_hook)
    56 );
     58PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook));
    5759
  • uspace/lib/pcut/tests/manytests.c

    r76d0981d r3bacee1  
    3636PCUT_INIT;
    3737
    38 PCUT_TEST(my_test_001) { }
    39 PCUT_TEST(my_test_002) { }
    40 PCUT_TEST(my_test_003) { }
    41 PCUT_TEST(my_test_004) { }
    42 PCUT_TEST(my_test_005) { }
    43 PCUT_TEST(my_test_006) { }
    44 PCUT_TEST(my_test_007) { }
    45 PCUT_TEST(my_test_008) { }
    46 PCUT_TEST(my_test_009) { }
    47 PCUT_TEST(my_test_010) { }
    48 PCUT_TEST(my_test_011) { }
    49 PCUT_TEST(my_test_012) { }
    50 PCUT_TEST(my_test_013) { }
    51 PCUT_TEST(my_test_014) { }
    52 PCUT_TEST(my_test_015) { }
    53 PCUT_TEST(my_test_016) { }
    54 PCUT_TEST(my_test_017) { }
    55 PCUT_TEST(my_test_018) { }
    56 PCUT_TEST(my_test_019) { }
    57 PCUT_TEST(my_test_020) { }
    58 PCUT_TEST(my_test_021) { }
    59 PCUT_TEST(my_test_022) { }
    60 PCUT_TEST(my_test_023) { }
    61 PCUT_TEST(my_test_024) { }
    62 PCUT_TEST(my_test_025) { }
    63 PCUT_TEST(my_test_026) { }
    64 PCUT_TEST(my_test_027) { }
    65 PCUT_TEST(my_test_028) { }
    66 PCUT_TEST(my_test_029) { }
    67 PCUT_TEST(my_test_030) { }
    68 PCUT_TEST(my_test_031) { }
    69 PCUT_TEST(my_test_032) { }
    70 PCUT_TEST(my_test_033) { }
    71 PCUT_TEST(my_test_034) { }
    72 PCUT_TEST(my_test_035) { }
    73 PCUT_TEST(my_test_036) { }
    74 PCUT_TEST(my_test_037) { }
    75 PCUT_TEST(my_test_038) { }
    76 PCUT_TEST(my_test_039) { }
    77 PCUT_TEST(my_test_040) { }
    78 PCUT_TEST(my_test_041) { }
    79 PCUT_TEST(my_test_042) { }
    80 PCUT_TEST(my_test_043) { }
    81 PCUT_TEST(my_test_044) { }
    82 PCUT_TEST(my_test_045) { }
    83 PCUT_TEST(my_test_046) { }
    84 PCUT_TEST(my_test_047) { }
    85 PCUT_TEST(my_test_048) { }
    86 PCUT_TEST(my_test_049) { }
    87 PCUT_TEST(my_test_050) { }
    88 PCUT_TEST(my_test_051) { }
    89 PCUT_TEST(my_test_052) { }
    90 PCUT_TEST(my_test_053) { }
    91 PCUT_TEST(my_test_054) { }
    92 PCUT_TEST(my_test_055) { }
    93 PCUT_TEST(my_test_056) { }
    94 PCUT_TEST(my_test_057) { }
    95 PCUT_TEST(my_test_058) { }
    96 PCUT_TEST(my_test_059) { }
    97 PCUT_TEST(my_test_060) { }
    98 PCUT_TEST(my_test_061) { }
    99 PCUT_TEST(my_test_062) { }
    100 PCUT_TEST(my_test_063) { }
    101 PCUT_TEST(my_test_064) { }
    102 PCUT_TEST(my_test_065) { }
    103 PCUT_TEST(my_test_066) { }
    104 PCUT_TEST(my_test_067) { }
    105 PCUT_TEST(my_test_068) { }
    106 PCUT_TEST(my_test_069) { }
    107 PCUT_TEST(my_test_070) { }
    108 PCUT_TEST(my_test_071) { }
    109 PCUT_TEST(my_test_072) { }
    110 PCUT_TEST(my_test_073) { }
    111 PCUT_TEST(my_test_074) { }
    112 PCUT_TEST(my_test_075) { }
    113 PCUT_TEST(my_test_076) { }
    114 PCUT_TEST(my_test_077) { }
    115 PCUT_TEST(my_test_078) { }
    116 PCUT_TEST(my_test_079) { }
    117 PCUT_TEST(my_test_080) { }
     38PCUT_TEST(my_test_001)
     39{
     40}
     41PCUT_TEST(my_test_002)
     42{
     43}
     44PCUT_TEST(my_test_003)
     45{
     46}
     47PCUT_TEST(my_test_004)
     48{
     49}
     50PCUT_TEST(my_test_005)
     51{
     52}
     53PCUT_TEST(my_test_006)
     54{
     55}
     56PCUT_TEST(my_test_007)
     57{
     58}
     59PCUT_TEST(my_test_008)
     60{
     61}
     62PCUT_TEST(my_test_009)
     63{
     64}
     65PCUT_TEST(my_test_010)
     66{
     67}
     68PCUT_TEST(my_test_011)
     69{
     70}
     71PCUT_TEST(my_test_012)
     72{
     73}
     74PCUT_TEST(my_test_013)
     75{
     76}
     77PCUT_TEST(my_test_014)
     78{
     79}
     80PCUT_TEST(my_test_015)
     81{
     82}
     83PCUT_TEST(my_test_016)
     84{
     85}
     86PCUT_TEST(my_test_017)
     87{
     88}
     89PCUT_TEST(my_test_018)
     90{
     91}
     92PCUT_TEST(my_test_019)
     93{
     94}
     95PCUT_TEST(my_test_020)
     96{
     97}
     98PCUT_TEST(my_test_021)
     99{
     100}
     101PCUT_TEST(my_test_022)
     102{
     103}
     104PCUT_TEST(my_test_023)
     105{
     106}
     107PCUT_TEST(my_test_024)
     108{
     109}
     110PCUT_TEST(my_test_025)
     111{
     112}
     113PCUT_TEST(my_test_026)
     114{
     115}
     116PCUT_TEST(my_test_027)
     117{
     118}
     119PCUT_TEST(my_test_028)
     120{
     121}
     122PCUT_TEST(my_test_029)
     123{
     124}
     125PCUT_TEST(my_test_030)
     126{
     127}
     128PCUT_TEST(my_test_031)
     129{
     130}
     131PCUT_TEST(my_test_032)
     132{
     133}
     134PCUT_TEST(my_test_033)
     135{
     136}
     137PCUT_TEST(my_test_034)
     138{
     139}
     140PCUT_TEST(my_test_035)
     141{
     142}
     143PCUT_TEST(my_test_036)
     144{
     145}
     146PCUT_TEST(my_test_037)
     147{
     148}
     149PCUT_TEST(my_test_038)
     150{
     151}
     152PCUT_TEST(my_test_039)
     153{
     154}
     155PCUT_TEST(my_test_040)
     156{
     157}
     158PCUT_TEST(my_test_041)
     159{
     160}
     161PCUT_TEST(my_test_042)
     162{
     163}
     164PCUT_TEST(my_test_043)
     165{
     166}
     167PCUT_TEST(my_test_044)
     168{
     169}
     170PCUT_TEST(my_test_045)
     171{
     172}
     173PCUT_TEST(my_test_046)
     174{
     175}
     176PCUT_TEST(my_test_047)
     177{
     178}
     179PCUT_TEST(my_test_048)
     180{
     181}
     182PCUT_TEST(my_test_049)
     183{
     184}
     185PCUT_TEST(my_test_050)
     186{
     187}
     188PCUT_TEST(my_test_051)
     189{
     190}
     191PCUT_TEST(my_test_052)
     192{
     193}
     194PCUT_TEST(my_test_053)
     195{
     196}
     197PCUT_TEST(my_test_054)
     198{
     199}
     200PCUT_TEST(my_test_055)
     201{
     202}
     203PCUT_TEST(my_test_056)
     204{
     205}
     206PCUT_TEST(my_test_057)
     207{
     208}
     209PCUT_TEST(my_test_058)
     210{
     211}
     212PCUT_TEST(my_test_059)
     213{
     214}
     215PCUT_TEST(my_test_060)
     216{
     217}
     218PCUT_TEST(my_test_061)
     219{
     220}
     221PCUT_TEST(my_test_062)
     222{
     223}
     224PCUT_TEST(my_test_063)
     225{
     226}
     227PCUT_TEST(my_test_064)
     228{
     229}
     230PCUT_TEST(my_test_065)
     231{
     232}
     233PCUT_TEST(my_test_066)
     234{
     235}
     236PCUT_TEST(my_test_067)
     237{
     238}
     239PCUT_TEST(my_test_068)
     240{
     241}
     242PCUT_TEST(my_test_069)
     243{
     244}
     245PCUT_TEST(my_test_070)
     246{
     247}
     248PCUT_TEST(my_test_071)
     249{
     250}
     251PCUT_TEST(my_test_072)
     252{
     253}
     254PCUT_TEST(my_test_073)
     255{
     256}
     257PCUT_TEST(my_test_074)
     258{
     259}
     260PCUT_TEST(my_test_075)
     261{
     262}
     263PCUT_TEST(my_test_076)
     264{
     265}
     266PCUT_TEST(my_test_077)
     267{
     268}
     269PCUT_TEST(my_test_078)
     270{
     271}
     272PCUT_TEST(my_test_079)
     273{
     274}
     275PCUT_TEST(my_test_080)
     276{
     277}
    118278
    119279
  • uspace/lib/pcut/tests/preinithook.c

    r76d0981d r3bacee1  
    3434static int init_counter = 1;
    3535
    36 static void init_hook(void) {
     36static void init_hook(void)
     37{
    3738        init_counter++;
    3839}
    3940
    40 static void pre_init_hook(int *argc, char **argv[]) {
     41static void pre_init_hook(int *argc, char **argv[])
     42{
    4143        (void) argc;
    4244        (void) argv;
     
    4446}
    4547
    46 PCUT_TEST_BEFORE {
     48PCUT_TEST_BEFORE
     49{
    4750        PCUT_ASSERT_INT_EQUALS(4, init_counter);
    4851        init_counter++;
    4952}
    5053
    51 PCUT_TEST(check_init_counter) {
     54PCUT_TEST(check_init_counter)
     55{
    5256        PCUT_ASSERT_INT_EQUALS(5, init_counter);
    5357}
    5458
    55 PCUT_TEST(check_init_counter_2) {
     59PCUT_TEST(check_init_counter_2)
     60{
    5661        PCUT_ASSERT_INT_EQUALS(5, init_counter);
    5762}
    5863
    5964
    60 PCUT_CUSTOM_MAIN(
    61         PCUT_MAIN_SET_INIT_HOOK(init_hook),
    62         PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
    63 );
     65PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook),
     66    PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
    6467
  • uspace/lib/pcut/tests/printing.c

    r76d0981d r3bacee1  
    3333PCUT_INIT;
    3434
    35 PCUT_TEST(print_to_stdout) {
     35PCUT_TEST(print_to_stdout)
     36{
    3637        printf("Printed from a test to stdout!\n");
    3738}
    3839
    39 PCUT_TEST(print_to_stderr) {
     40PCUT_TEST(print_to_stderr)
     41{
    4042        fprintf(stderr, "Printed from a test to stderr!\n");
    4143}
    4244
    43 PCUT_TEST(print_to_stdout_and_fail) {
     45PCUT_TEST(print_to_stdout_and_fail)
     46{
    4447        printf("Printed from a test to stdout!\n");
    4548        PCUT_ASSERT_NOT_NULL(0);
  • uspace/lib/pcut/tests/simple.c

    r76d0981d r3bacee1  
    3232PCUT_INIT;
    3333
    34 PCUT_TEST(zero_exponent) {
     34PCUT_TEST(zero_exponent)
     35{
    3536        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3637}
    3738
    38 PCUT_TEST(one_exponent) {
     39PCUT_TEST(one_exponent)
     40{
    3941        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4042        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
    4143}
    4244
    43 PCUT_TEST(same_strings) {
     45PCUT_TEST(same_strings)
     46{
    4447        const char *p = "xyz";
    4548        PCUT_ASSERT_STR_EQUALS("xyz", p);
  • uspace/lib/pcut/tests/skip.c

    r76d0981d r3bacee1  
    3232PCUT_INIT;
    3333
    34 PCUT_TEST(normal_test) {
     34PCUT_TEST(normal_test)
     35{
    3536        PCUT_ASSERT_INT_EQUALS(1, 1);
    3637}
    3738
    38 PCUT_TEST(skipped, PCUT_TEST_SKIP) {
     39PCUT_TEST(skipped, PCUT_TEST_SKIP)
     40{
    3941        PCUT_ASSERT_STR_EQUALS("skip", "not skipped");
    4042}
    4143
    42 PCUT_TEST(again_normal_test) {
     44PCUT_TEST(again_normal_test)
     45{
    4346        PCUT_ASSERT_INT_EQUALS(1, 1);
    4447}
  • uspace/lib/pcut/tests/suite1.c

    r76d0981d r3bacee1  
    3434PCUT_TEST_SUITE(intpow);
    3535
    36 PCUT_TEST(zero_exponent) {
     36PCUT_TEST(zero_exponent)
     37{
    3738        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3839}
    3940
    40 PCUT_TEST(one_exponent) {
     41PCUT_TEST(one_exponent)
     42{
    4143        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4244        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
  • uspace/lib/pcut/tests/suite2.c

    r76d0981d r3bacee1  
    3434PCUT_TEST_SUITE(intmin);
    3535
    36 PCUT_TEST(test_min) {
     36PCUT_TEST(test_min)
     37{
    3738        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
    3839        PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
     
    4142}
    4243
    43 PCUT_TEST(test_same_numbers) {
     44PCUT_TEST(test_same_numbers)
     45{
    4446        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 5));
    4547        PCUT_ASSERT_INT_EQUALS(719, intmin(719, 719));
  • uspace/lib/pcut/tests/suites.c

    r76d0981d r3bacee1  
    3434PCUT_TEST_SUITE(intpow);
    3535
    36 PCUT_TEST(zero_exponent) {
     36PCUT_TEST(zero_exponent)
     37{
    3738        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3839}
    3940
    40 PCUT_TEST(one_exponent) {
     41PCUT_TEST(one_exponent)
     42{
    4143        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4244        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
     
    4547PCUT_TEST_SUITE(intmin);
    4648
    47 PCUT_TEST(test_min) {
     49PCUT_TEST(test_min)
     50{
    4851        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
    4952        PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
  • uspace/lib/pcut/tests/teardown.c

    r76d0981d r3bacee1  
    3737PCUT_TEST_SUITE(with_teardown);
    3838
    39 PCUT_TEST_AFTER {
     39PCUT_TEST_AFTER
     40{
    4041        printf("This is teardown-function.\n");
    4142}
    4243
    43 PCUT_TEST(empty) {
     44PCUT_TEST(empty)
     45{
    4446}
    4547
    46 PCUT_TEST(failing) {
     48PCUT_TEST(failing)
     49{
    4750        PCUT_ASSERT_INT_EQUALS(10, intmin(1, 2));
    4851}
     
    5255PCUT_TEST_SUITE(with_failing_teardown);
    5356
    54 PCUT_TEST_AFTER {
     57PCUT_TEST_AFTER
     58{
    5559        printf("This is failing teardown-function.\n");
    5660        PCUT_ASSERT_INT_EQUALS(42, intmin(10, 20));
    5761}
    5862
    59 PCUT_TEST(empty2) {
     63PCUT_TEST(empty2)
     64{
    6065}
    6166
    62 PCUT_TEST(printing2) {
     67PCUT_TEST(printing2)
     68{
    6369        printf("Printed before test failure.\n");
    6470        PCUT_ASSERT_INT_EQUALS(0, intmin(-17, -19));
    6571}
    6672
    67 PCUT_TEST(failing2) {
     73PCUT_TEST(failing2)
     74{
    6875        PCUT_ASSERT_INT_EQUALS(12, intmin(3, 5));
    6976}
  • uspace/lib/pcut/tests/teardownaborts.c

    r76d0981d r3bacee1  
    3333PCUT_INIT;
    3434
    35 PCUT_TEST_AFTER {
     35PCUT_TEST_AFTER
     36{
    3637        abort();
    3738}
    3839
    39 PCUT_TEST(print_and_fail) {
     40PCUT_TEST(print_and_fail)
     41{
    4042        printf("Tear-down will cause null pointer access...\n");
    4143        PCUT_ASSERT_NOT_NULL(NULL);
  • uspace/lib/pcut/tests/testlist.c

    r76d0981d r3bacee1  
    3838};
    3939
    40 static void pre_init_hook(int *argc, char **argv[]) {
     40static void pre_init_hook(int *argc, char **argv[])
     41{
    4142        argv_patched[0] = (*argv)[0];
    4243        *argc = 2;
     
    4445}
    4546
    46 PCUT_TEST(unreachable) {
     47PCUT_TEST(unreachable)
     48{
    4749        PCUT_ASSERT_TRUE(0 && "unreachable code");
    4850}
    4951
    5052
    51 PCUT_CUSTOM_MAIN(
    52         PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
    53 );
     53PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
    5454
  • uspace/lib/pcut/tests/timeout.c

    r76d0981d r3bacee1  
    4343#include "tested.h"
    4444
    45 static void my_sleep(int sec) {
     45static void my_sleep(int sec)
     46{
    4647#ifdef __helenos__
    4748        thread_sleep(sec);
     
    5859PCUT_INIT;
    5960
    60 PCUT_TEST(shall_time_out) {
     61PCUT_TEST(shall_time_out)
     62{
    6163        printf("Text before sleeping.\n");
    6264        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 5);
     
    6567
    6668PCUT_TEST(custom_time_out,
    67                 PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3)) {
     69    PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3))
     70{
    6871        printf("Text before sleeping.\n");
    6972        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 2);
  • uspace/lib/pcut/tests/xmlreport.c

    r76d0981d r3bacee1  
    3535PCUT_INIT;
    3636
    37 PCUT_TEST(zero_exponent) {
     37PCUT_TEST(zero_exponent)
     38{
    3839        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3940}
    4041
    41 PCUT_TEST(one_exponent) {
     42PCUT_TEST(one_exponent)
     43{
    4244        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4345        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
    4446}
    4547
    46 PCUT_TEST(same_strings) {
     48PCUT_TEST(same_strings)
     49{
    4750        const char *p = "xyz";
    4851        PCUT_ASSERT_STR_EQUALS("xyz", p);
     
    5053}
    5154
    52 PCUT_CUSTOM_MAIN(
    53         PCUT_MAIN_SET_XML_REPORT
    54 );
     55PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_XML_REPORT);
Note: See TracChangeset for help on using the changeset viewer.