22 static Assertion makeExpect (
Condition condition,
const char* file,
int line)
24 return Assertion (Level::expect, std::move (condition), file, line);
27 static Assertion makeAssert (
Condition condition,
const char* file,
int line)
29 return Assertion (Level::assert, std::move (condition), file, line);
32 bool hasFailed()
const
34 return m_condition.getResult() ==
false;
37 Level getLevel()
const
42 const char* getFile()
const
52 void representWithTokens (std::ostream& stream)
const
54 m_condition.representWithTokens (stream);
57 void representWithStringRepresentations (std::ostream& stream)
const
59 m_condition.representWithStringRepresentations (stream);
63 Assertion (Level level,
Condition condition,
const char* file,
int line) :
65 m_condition (std::move (condition)),
73 const char*
const m_file;
A class representing some condition.