Changeset 4b54bd9 in mainline for uspace/lib/pcut/src/report/xml.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/xml.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. */
     
    5259 * @param all_items Start of the list with all items.
    5360 */
    54 static void xml_init(pcut_item_t *all_items)
    55 {
     61static void xml_init(pcut_item_t *all_items) {
    5662        int tests_total = pcut_count_tests(all_items);
    5763        test_counter = 0;
     
    6571 * @param suite Suite that just started.
    6672 */
    67 static void xml_suite_start(pcut_item_t *suite)
    68 {
     73static void xml_suite_start(pcut_item_t *suite) {
    6974        tests_in_suite = 0;
    7075        failed_tests_in_suite = 0;
     
    7782 * @param suite Suite that just ended.
    7883 */
    79 static void xml_suite_done(pcut_item_t *suite)
    80 {
     84static void xml_suite_done(pcut_item_t *suite) {
    8185        printf("\t</suite><!-- %s: %d / %d -->\n", suite->name,
    82             failed_tests_in_suite, tests_in_suite);
     86                failed_tests_in_suite, tests_in_suite);
    8387}
    8488
     
    8993 * @param test Test that is started.
    9094 */
    91 static void xml_test_start(pcut_item_t *test)
    92 {
     95static void xml_test_start(pcut_item_t *test) {
    9396        PCUT_UNUSED(test);
    9497
     
    102105 * @param element_name Wrapping XML element name.
    103106 */
    104 static void print_by_lines(const char *message, const char *element_name)
    105 {
     107static void print_by_lines(const char *message, const char *element_name) {
    106108        char *next_line_start;
    107109
     
    135137 */
    136138static void xml_test_done(pcut_item_t *test, int outcome,
    137     const char *error_message, const char *teardown_error_message,
    138     const char *extra_output)
    139 {
     139                const char *error_message, const char *teardown_error_message,
     140                const char *extra_output) {
    140141        const char *test_name = test->name;
    141142        const char *status_str = NULL;
     
    158159
    159160        printf("\t\t<testcase name=\"%s\" status=\"%s\">\n", test_name,
    160             status_str);
     161                status_str);
    161162
    162163        print_by_lines(error_message, "error-message");
     
    169170
    170171/** Report testing done. */
    171 static void xml_done(void)
    172 {
     172static void xml_done(void) {
    173173        printf("</report>\n");
    174174}
Note: See TracChangeset for help on using the changeset viewer.