• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
11 #include <cstddef>
12 
13 namespace Catch {
14 
15     struct Counts {
16         Counts operator - ( Counts const& other ) const;
17         Counts& operator += ( Counts const& other );
18 
19         std::size_t total() const;
20         bool allPassed() const;
21         bool allOk() const;
22 
23         std::size_t passed = 0;
24         std::size_t failed = 0;
25         std::size_t failedButOk = 0;
26     };
27 
28     struct Totals {
29 
30         Totals operator - ( Totals const& other ) const;
31         Totals& operator += ( Totals const& other );
32 
33         Totals delta( Totals const& prevTotals ) const;
34 
35         int error = 0;
36         Counts assertions;
37         Counts testCases;
38     };
39 }
40 
41 #endif // TWOBLUECUBES_CATCH_TOTALS_HPP_INCLUDED
42