Changeset 4b54bd9 in mainline for uspace/lib/pcut/tests/inithook.c
- Timestamp:
- 2018-09-12T13:23:03Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3da0ee4
- Parents:
- 275530a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/tests/inithook.c
r275530a4 r4b54bd9 30 30 #include "tested.h" 31 31 32 PCUT_INIT ;32 PCUT_INIT 33 33 34 34 static int init_counter = 0; 35 35 36 static void init_hook(void) 37 { 36 static void init_hook(void) { 38 37 init_counter++; 39 38 } 40 39 41 PCUT_TEST_BEFORE 42 { 40 PCUT_TEST_BEFORE { 43 41 PCUT_ASSERT_INT_EQUALS(1, init_counter); 44 42 init_counter++; 45 43 } 46 44 47 PCUT_TEST(check_init_counter) 48 { 45 PCUT_TEST(check_init_counter) { 49 46 PCUT_ASSERT_INT_EQUALS(2, init_counter); 50 47 } 51 48 52 PCUT_TEST(check_init_counter_2) 53 { 49 PCUT_TEST(check_init_counter_2) { 54 50 PCUT_ASSERT_INT_EQUALS(2, init_counter); 55 51 } 56 52 57 53 58 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook)); 54 PCUT_CUSTOM_MAIN( 55 PCUT_MAIN_SET_INIT_HOOK(init_hook) 56 ) 59 57
Note:
See TracChangeset
for help on using the changeset viewer.