Changeset 96ae12b in mainline for uspace/lib/cpp/include/internal/test/tests.hpp
- Timestamp:
- 2018-07-05T21:41:23Z (7 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/test/tests.hpp
re54bbde5 r96ae12b 1 1 /* 2 * Copyright (c) 201 7Jaroslav Jindrak2 * Copyright (c) 2018 Jaroslav Jindrak 3 3 * All rights reserved. 4 4 * … … 47 47 } 48 48 49 bool run( )49 bool run(bool report) 50 50 { 51 51 bool res{true}; … … 55 55 for (auto test: tests_) 56 56 { 57 res &= test->run( );57 res &= test->run(report); 58 58 succeeded += test->get_succeeded(); 59 59 failed += test->get_failed(); 60 60 } 61 61 62 std::printf("\n"); 63 if (res) 64 std::printf("[TESTS SUCCEEDED!]"); 65 else 66 std::printf("[TESTS FAILED]"); 67 std::printf("[%u OK][%u FAIL][%u TOTAL]\n", 68 succeeded, failed, (succeeded + failed)); 62 if (report) 63 { 64 std::printf("\n"); 65 if (res) 66 std::printf("[TESTS SUCCEEDED!]"); 67 else 68 std::printf("[TESTS FAILED]"); 69 std::printf("[%u OK][%u FAIL][%u TOTAL]\n", 70 succeeded, failed, (succeeded + failed)); 71 } 69 72 70 73 return res; … … 84 87 { 85 88 public: 86 bool run( ) override;89 bool run(bool) override; 87 90 const char* name() override; 88 91 … … 94 97 { 95 98 public: 96 bool run( ) override;99 bool run(bool) override; 97 100 const char* name() override; 98 101 … … 109 112 { 110 113 public: 111 bool run( ) override;114 bool run(bool) override; 112 115 const char* name() override; 113 116
Note:
See TracChangeset
for help on using the changeset viewer.