Changeset 4b54bd9 in mainline for uspace/lib/pcut/tests/timeout.c
- Timestamp:
- 2018-09-12T13:23:03Z (7 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/timeout.c
r275530a4 r4b54bd9 1 1 /* 2 * Copyright (c) 2012-201 3Vojtech Horky2 * Copyright (c) 2012-2018 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 32 32 #include <fibril.h> 33 33 #else 34 #if def __unix34 #if defined(__unix) || defined(__APPLE__) 35 35 #include <unistd.h> 36 36 #endif … … 43 43 #include "tested.h" 44 44 45 static void my_sleep(int sec) 46 { 45 static void my_sleep(int sec) { 47 46 #ifdef __helenos__ 48 47 fibril_sleep(sec); 49 48 #else 50 #if def __unix49 #if defined(__unix) || defined(__APPLE__) 51 50 sleep(sec); 52 51 #endif … … 57 56 } 58 57 59 PCUT_INIT ;58 PCUT_INIT 60 59 61 PCUT_TEST(shall_time_out) 62 { 60 PCUT_TEST(shall_time_out) { 63 61 printf("Text before sleeping.\n"); 64 62 my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 5); … … 67 65 68 66 PCUT_TEST(custom_time_out, 69 PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3)) 70 { 67 PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3)) { 71 68 printf("Text before sleeping.\n"); 72 69 my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 2); … … 74 71 } 75 72 76 PCUT_MAIN() ;73 PCUT_MAIN()
Note:
See TracChangeset
for help on using the changeset viewer.