OTest2
A C++ testing framework
|
Go to the documentation of this file.
19 #ifndef OTest2__LIB_TESTMARK_H_
20 #define OTest2__LIB_TESTMARK_H_
32 class TestMarkFactory;
33 class TestMarkFormatter;
66 virtual
bool doIsEqual(
68 long double precision_) const = 0;
82 virtual
bool doIsEqualValue(
84 long double precision_) const = 0;
92 virtual
void doDiffArray(
106 const std::
string& label_,
113 virtual
void doPrintOpen(
115 const std::
string& prefix_) const = 0;
120 virtual
void doPrintClose(
122 const std::
string& prefix_) const = 0;
127 virtual
void doSerializeMark(
133 virtual
void doDeserializeMark(
137 static
void computeDiff(
226 const std::
string& prefix_) const;
236 const std::
string& prefix_) const;
bool isEqual(const TestMark &other_, long double precision_=DEFAULT_FLOAT_PRECISION) const
Compare two marks for equality.
void linearizedMark(std::vector< LinearizedRecord > &array_) const
Create the linearized test mark.
void printOpen(std::ostream &os_, const std::string &prefix_) const
Print opening of the node into a stream.
A generic interface of a testmark deserializer.
void printAddMark(TestMarkFormatter &formatter_) const
Print the testmark as it's completely new.
bool isEqualValue(const TestMark &other_, long double precision_=DEFAULT_FLOAT_PRECISION) const
Compare values of 2 test mark nodes.
std::uint64_t TestMarkHashCode
void deserializeMark(TestMarkFactory &factory_, TestMarkIn &deserializer_)
Deserialize the testmark.
bool isEqualValueHash(const TestMark &other_, long double precision_=DEFAULT_FLOAT_PRECISION) const
Compare values of 2 testmark nodes and their hash codes.
TestMarkHashCode getHashCode() const noexcept
Get testmarks' hash code.
A generic interface of a serializer of test marks.
void printMark(TestMarkFormatter &formatter_) const
Print the testmark.
Generic interface of the log builder.
virtual void doLinearizedMark(int level_, const std::string &label_, std::vector< LinearizedRecord > &array_) const =0
Create linearized test mark.
constexpr long double DEFAULT_FLOAT_PRECISION(1.0e-12)
Default precision for floating point comparisons.
void printClose(std::ostream &os_, const std::string &prefix_) const
Print closing of the node into a stream.
void serializeMark(TestMarkOut &serializer_) const
Serialize the testmark into a serializer.
One item of linearized test mark.
Generic interface of a test mark node.
A factory of testmark objects used for deserialization.