Chebyshev
Unit testing for scientific software
err_structures.h
Go to the documentation of this file.
1 
5 
6 #ifndef CHEBYSHEV_ERR_STRUCTURES_H
7 #define CHEBYSHEV_ERR_STRUCTURES_H
8 
9 #include <string>
10 #include <vector>
11 #include <map>
12 
13 
14 namespace chebyshev {
15 
16  namespace err {
17 
18 
21  struct assert_result {
22 
24  std::string name = "unknown";
25 
27  bool evaluated = false;
28 
31 
33  bool failed = true;
34 
36  bool quiet = false;
37  };
38 
39 
42  struct errno_result {
43 
45  std::string name = "unknown";
46 
48  int evaluated;
49 
51  std::vector<int> expectedFlags;
52 
54  bool failed = true;
55 
57  bool quiet = false;
58  };
59 
60 
64 
66  std::string name = "unknown";
67 
69  bool thrown = false;
70 
73  bool correctType = true;
74 
76  bool failed = true;
77 
79  bool quiet = false;
80  };
81 
82  }
83 }
84 
85 #endif
std::string string(size_t length)
Generate a random string made of human-readable ASCII characters.
Definition: random.h:84
General namespace of the framework.
Definition: benchmark_structures.h:16
Result of assertion checking of a function.
Definition: err_structures.h:21
std::string name
Identifying name of the function or test case.
Definition: err_structures.h:24
bool evaluated
Evaluated boolean value.
Definition: err_structures.h:27
bool quiet
Whether to print to standard output or not.
Definition: err_structures.h:36
bool failed
Whether the test failed.
Definition: err_structures.h:33
std::string description
Description of the assertion.
Definition: err_structures.h:30
Result of errno checking of a function.
Definition: err_structures.h:42
int evaluated
Evaluated errno value.
Definition: err_structures.h:48
std::string name
Identifying name of the function or test case.
Definition: err_structures.h:45
std::vector< int > expectedFlags
Expected errno flags.
Definition: err_structures.h:51
bool quiet
Whether to print to standard output or not.
Definition: err_structures.h:57
bool failed
Whether the test failed.
Definition: err_structures.h:54
Result of exception checking of a function.
Definition: err_structures.h:63
bool thrown
Whether the function has thrown.
Definition: err_structures.h:69
std::string name
Identifying name of the function or test case.
Definition: err_structures.h:66
bool correctType
Whether the type of the thrown exception was correct.
Definition: err_structures.h:73
bool quiet
Whether to print to standard output or not.
Definition: err_structures.h:79
bool failed
Whether the test failed.
Definition: err_structures.h:76