Changeset 1433ecda in mainline for uspace/lib/pcut/src/run.c


Ignore:
Timestamp:
2018-04-04T15:42:37Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/src/run.c

    r47b2d7e3 r1433ecda  
    7373static int default_suite_initialized = 0;
    7474
    75 static void init_default_suite_when_needed() {
     75static void init_default_suite_when_needed()
     76{
    7677        if (default_suite_initialized) {
    7778                return;
     
    9192 * @return Always a valid test suite item.
    9293 */
    93 static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it) {
     94static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it)
     95{
    9496        while (it != NULL) {
    9597                if (it->kind == PCUT_KIND_TESTSUITE) {
     
    106108 * @param func Function to run (can be NULL).
    107109 */
    108 static void run_setup_teardown(pcut_setup_func_t func) {
     110static void run_setup_teardown(pcut_setup_func_t func)
     111{
    109112        if (func != NULL) {
    110113                func();
     
    119122 * @param outcome Outcome of the current test.
    120123 */
    121 static void leave_test(int outcome) {
     124static void leave_test(int outcome)
     125{
    122126        PCUT_DEBUG("leave_test(outcome=%d), will_exit=%s", outcome,
    123                 leave_means_exit ? "yes" : "no");
     127            leave_means_exit ? "yes" : "no");
    124128        if (leave_means_exit) {
    125129                exit(outcome);
     
    138142 * @param message Message describing the failure.
    139143 */
    140 void pcut_failed_assertion(const char *message) {
     144void pcut_failed_assertion(const char *message)
     145{
    141146        static const char *prev_message = NULL;
    142147        /*
     
    157162                if (report_test_result) {
    158163                        pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
    159                                 message, NULL, NULL);
     164                            message, NULL, NULL);
    160165                }
    161166        } else {
    162167                if (report_test_result) {
    163168                        pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
    164                                 prev_message, message, NULL);
     169                            prev_message, message, NULL);
    165170                }
    166171        }
     
    176181 * @return Error status (zero means success).
    177182 */
    178 static int run_test(pcut_item_t *test) {
     183static int run_test(pcut_item_t *test)
     184{
    179185        /*
    180186         * Set here as the returning point in case of test failure.
     
    228234        if (report_test_result) {
    229235                pcut_report_test_done(current_test, PCUT_OUTCOME_PASS,
    230                         NULL, NULL, NULL);
     236                    NULL, NULL, NULL);
    231237        }
    232238
     
    242248 * @return Error status (zero means success).
    243249 */
    244 int pcut_run_test_forked(pcut_item_t *test) {
     250int pcut_run_test_forked(pcut_item_t *test)
     251{
    245252        int rc;
    246253
     
    265272 * @return Error status (zero means success).
    266273 */
    267 int pcut_run_test_single(pcut_item_t *test) {
     274int pcut_run_test_single(pcut_item_t *test)
     275{
    268276        int rc;
    269277
     
    285293 * @return Timeout in seconds.
    286294 */
    287 int pcut_get_test_timeout(pcut_item_t *test) {
     295int pcut_get_test_timeout(pcut_item_t *test)
     296{
    288297        int timeout = PCUT_DEFAULT_TEST_TIMEOUT;
    289298        pcut_extra_t *extras = test->extras;
Note: See TracChangeset for help on using the changeset viewer.