CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
invariant.h
Go to the documentation of this file.
1
2
3#ifndef CPROVER_TESTING_UTILS_INVARIANT_H
4#define CPROVER_TESTING_UTILS_INVARIANT_H
5
7
8#include <string>
9
11
13 : public Catch::MatcherBase<invariant_failedt>
14{
15public:
16 explicit invariant_failure_containingt(std::string expected);
17 bool match(const invariant_failedt &exception) const override;
18 std::string describe() const override;
19
20private:
21 std::string expected;
22};
23
27invariant_failure_containing(std::string expected);
28
30std::ostream &
31operator<<(std::ostream &out, const invariant_failedt &invariant_failed);
32
33#endif // CPROVER_TESTING_UTILS_INVARIANT_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
A logic error, augmented with a distinguished field to hold a backtrace.
Definition c_errors.h:28
bool match(const invariant_failedt &exception) const override
Definition invariant.cpp:20
std::string describe() const override
Definition invariant.cpp:27
std::ostream & operator<<(std::ostream &out, const invariant_failedt &invariant_failed)
Printing of invariant_failedt for test failure messages.
Definition invariant.cpp:34
invariant_failure_containingt invariant_failure_containing(std::string expected)
Returns a matcher which matches an invariant_failedt exception, where the .what() returns a string co...
Definition invariant.cpp:9