Changeset 4b54bd9 in mainline for uspace/lib/pcut/tests/timeout.c


Ignore:
Timestamp:
2018-09-12T13:23:03Z (7 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3da0ee4
Parents:
275530a4
Message:

Update PCUT to latest revision

File:
1 edited

Legend:

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

    r275530a4 r4b54bd9  
    11/*
    2  * Copyright (c) 2012-2013 Vojtech Horky
     2 * Copyright (c) 2012-2018 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    3232#include <fibril.h>
    3333#else
    34 #ifdef __unix
     34#if defined(__unix) || defined(__APPLE__)
    3535#include <unistd.h>
    3636#endif
     
    4343#include "tested.h"
    4444
    45 static void my_sleep(int sec)
    46 {
     45static void my_sleep(int sec) {
    4746#ifdef __helenos__
    4847        fibril_sleep(sec);
    4948#else
    50 #ifdef __unix
     49#if defined(__unix) || defined(__APPLE__)
    5150        sleep(sec);
    5251#endif
     
    5756}
    5857
    59 PCUT_INIT;
     58PCUT_INIT
    6059
    61 PCUT_TEST(shall_time_out)
    62 {
     60PCUT_TEST(shall_time_out) {
    6361        printf("Text before sleeping.\n");
    6462        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 5);
     
    6765
    6866PCUT_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)) {
    7168        printf("Text before sleeping.\n");
    7269        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 2);
     
    7471}
    7572
    76 PCUT_MAIN();
     73PCUT_MAIN()
Note: See TracChangeset for help on using the changeset viewer.