35 const char SERIALIZE_TYPE_MARK[] =
"ot2:float";
56 return SERIALIZE_TYPE_MARK;
63 bool TestMarkFloat::doIsEqual(
64 const TestMark& other_,
65 long double precision_)
const {
66 return std::abs(value -
static_cast<const TestMarkFloat*
>(&other_)->value)
70 bool TestMarkFloat::doIsEqualValue(
71 const TestMark& other_,
72 long double precision_)
const {
73 return doIsEqual(other_, precision_);
76 void TestMarkFloat::doDiffArray(
78 std::vector<LinearizedRecord>& array_)
const
83 void TestMarkFloat::doLinearizedMark(
85 const std::string& label_,
86 std::vector<LinearizedRecord>& array_)
const {
87 array_.push_back({level_,
this, label_});
90 void TestMarkFloat::doPrintOpen(
92 const std::string& prefix_)
const {
95 std::numeric_limits<long double>::digits10 + 1)
99 void TestMarkFloat::doPrintClose(
101 const std::string& prefix_)
const {
105 void TestMarkFloat::doSerializeMark(
106 TestMarkOut& serializer_)
const {
107 serializer_.writeTypeMark(SERIALIZE_TYPE_MARK);
108 serializer_.writeFloat(value);
111 void TestMarkFloat::doDeserializeMark(
112 TestMarkFactory& factory_,
113 TestMarkIn& deserializer_) {
114 value = deserializer_.readFloat();