Changeset 3bacee1 in mainline for uspace/lib/pcut/tests/inithook.c
- Timestamp:
- 2018-04-12T16:27:17Z (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/tests/inithook.c
r76d0981d r3bacee1 34 34 static int init_counter = 0; 35 35 36 static void init_hook(void) { 36 static void init_hook(void) 37 { 37 38 init_counter++; 38 39 } 39 40 40 PCUT_TEST_BEFORE { 41 PCUT_TEST_BEFORE 42 { 41 43 PCUT_ASSERT_INT_EQUALS(1, init_counter); 42 44 init_counter++; 43 45 } 44 46 45 PCUT_TEST(check_init_counter) { 47 PCUT_TEST(check_init_counter) 48 { 46 49 PCUT_ASSERT_INT_EQUALS(2, init_counter); 47 50 } 48 51 49 PCUT_TEST(check_init_counter_2) { 52 PCUT_TEST(check_init_counter_2) 53 { 50 54 PCUT_ASSERT_INT_EQUALS(2, init_counter); 51 55 } 52 56 53 57 54 PCUT_CUSTOM_MAIN( 55 PCUT_MAIN_SET_INIT_HOOK(init_hook) 56 ); 58 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook)); 57 59
Note:
See TracChangeset
for help on using the changeset viewer.