Changeset 4b54bd9 in mainline for uspace/lib/pcut/src/report/tap.c


Ignore:
Timestamp:
2018-09-12T13:23:03Z (6 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/src/report/tap.c

    r275530a4 r4b54bd9  
    3434#include "../internal.h"
    3535#include "report.h"
     36
    3637#ifndef __helenos__
     38#pragma warning(push, 0)
    3739#include <string.h>
     40#pragma warning(pop)
    3841#endif
     42
     43#pragma warning(push, 0)
    3944#include <stdio.h>
     45#pragma warning(pop)
     46
    4047
    4148/** Counter of all run tests. */
     
    5562 * @param all_items Start of the list with all items.
    5663 */
    57 static void tap_init(pcut_item_t *all_items)
    58 {
     64static void tap_init(pcut_item_t *all_items) {
    5965        int tests_total = pcut_count_tests(all_items);
    6066        test_counter = 0;
     
    6874 * @param suite Suite that just started.
    6975 */
    70 static void tap_suite_start(pcut_item_t *suite)
    71 {
     76static void tap_suite_start(pcut_item_t *suite) {
    7277        tests_in_suite = 0;
    7378        failed_tests_in_suite = 0;
     
    8085 * @param suite Suite that just ended.
    8186 */
    82 static void tap_suite_done(pcut_item_t *suite)
    83 {
     87static void tap_suite_done(pcut_item_t *suite) {
    8488        if (failed_tests_in_suite == 0) {
    8589                printf("#> Finished suite %s (passed).\n",
    86                     suite->name);
     90                                suite->name);
    8791        } else {
    8892                printf("#> Finished suite %s (failed %d of %d).\n",
    89                     suite->name, failed_tests_in_suite, tests_in_suite);
     93                                suite->name, failed_tests_in_suite, tests_in_suite);
    9094        }
    9195}
     
    97101 * @param test Test that is started.
    98102 */
    99 static void tap_test_start(pcut_item_t *test)
    100 {
     103static void tap_test_start(pcut_item_t *test) {
    101104        PCUT_UNUSED(test);
    102105
     
    110113 * @param prefix Prefix for each new line, such as comment character.
    111114 */
    112 static void print_by_lines(const char *message, const char *prefix)
    113 {
     115static void print_by_lines(const char *message, const char *prefix) {
    114116        char *next_line_start;
    115117        if ((message == NULL) || (message[0] == 0)) {
     
    137139 */
    138140static void tap_test_done(pcut_item_t *test, int outcome,
    139     const char *error_message, const char *teardown_error_message,
    140     const char *extra_output)
    141 {
     141                const char *error_message, const char *teardown_error_message,
     142                const char *extra_output) {
    142143        const char *test_name = test->name;
    143144        const char *status_str = NULL;
     
    172173
    173174/** Report testing done. */
    174 static void tap_done(void)
    175 {
     175static void tap_done(void) {
    176176        if (failed_test_counter == 0) {
    177177                printf("#> Done: all tests passed.\n");
Note: See TracChangeset for help on using the changeset viewer.