Ignore:
Timestamp:
2018-07-05T21:41:23Z (7 years ago)
Author:
Dzejrou <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fceeb93
Parents:
e54bbde5
git-author:
Dzejrou <dzejrou@…> (2018-05-11 18:05:44)
git-committer:
Dzejrou <dzejrou@…> (2018-07-05 21:41:23)
Message:

cpp: updated & fixed tests, now output is optional (for possible use with pcut)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/src/internal/test/test.cpp

    re54bbde5 r96ae12b  
    3434    void test_suite::report(bool result, const char* tname)
    3535    {
     36        if (!report_)
     37            return;
     38
    3639        if (result)
    3740            std::printf("[%s][%s] ... OK\n", name(), tname);
     
    4245    void test_suite::start()
    4346    {
    44         std::printf("\n[TEST START][%s]\n", name());
     47        if (report_)
     48            std::printf("\n[TEST START][%s]\n", name());
    4549    }
    4650
    4751    bool test_suite::end()
    4852    {
    49         std::printf("[TEST END][%s][%u OK][%u FAIL]\n",
    50                     name(), succeeded_, failed_);
     53        if (report_)
     54            std::printf("[TEST END][%s][%u OK][%u FAIL]\n",
     55                        name(), succeeded_, failed_);
    5156        return ok_;
    5257    }
Note: See TracChangeset for help on using the changeset viewer.