catch_totals.hpp 985 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright Catch2 Authors
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // https://www.boost.org/LICENSE_1_0.txt)
  5. // SPDX-License-Identifier: BSL-1.0
  6. #ifndef CATCH_TOTALS_HPP_INCLUDED
  7. #define CATCH_TOTALS_HPP_INCLUDED
  8. #include <cstdint>
  9. namespace Catch {
  10. struct Counts {
  11. Counts operator - ( Counts const& other ) const;
  12. Counts& operator += ( Counts const& other );
  13. std::uint64_t total() const;
  14. bool allPassed() const;
  15. bool allOk() const;
  16. std::uint64_t passed = 0;
  17. std::uint64_t failed = 0;
  18. std::uint64_t failedButOk = 0;
  19. };
  20. struct Totals {
  21. Totals operator - ( Totals const& other ) const;
  22. Totals& operator += ( Totals const& other );
  23. Totals delta( Totals const& prevTotals ) const;
  24. Counts assertions;
  25. Counts testCases;
  26. };
  27. }
  28. #endif // CATCH_TOTALS_HPP_INCLUDED