catch_totals.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Created by Phil Nash on 23/02/2012.
  3. * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
  4. *
  5. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED
  9. #define TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED
  10. #include <cstddef>
  11. namespace Catch {
  12. struct Counts {
  13. Counts operator - ( Counts const& other ) const;
  14. Counts& operator += ( Counts const& other );
  15. std::size_t total() const;
  16. bool allPassed() const;
  17. bool allOk() const;
  18. std::size_t passed = 0;
  19. std::size_t failed = 0;
  20. std::size_t failedButOk = 0;
  21. };
  22. struct Totals {
  23. Totals operator - ( Totals const& other ) const;
  24. Totals& operator += ( Totals const& other );
  25. Totals delta( Totals const& prevTotals ) const;
  26. int error = 0;
  27. Counts assertions;
  28. Counts testCases;
  29. };
  30. }
  31. #endif // TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED