Added actual values to serialization test

This commit is contained in:
Svenn Tveit
2023-06-16 11:33:52 +02:00
parent af3f44423b
commit 32692b750e
2 changed files with 6 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ class Ppcwmax {
public:
Ppcwmax() = default;
explicit Ppcwmax(const Deck& deck);
explicit Ppcwmax(std::initializer_list<PpcwmaxRecord> records);
static Ppcwmax serializationTestObject();
std::size_t size() const;
bool empty() const;

View File

@@ -49,6 +49,10 @@ Ppcwmax::Ppcwmax(const Deck& deck) {
}
}
Ppcwmax::Ppcwmax(std::initializer_list<PpcwmaxRecord> records)
: data{ records }
{}
bool Ppcwmax::empty() const {
return this->data.empty();
}
@@ -66,8 +70,7 @@ std::vector< PpcwmaxRecord >::const_iterator Ppcwmax::end() const {
}
Ppcwmax Ppcwmax::serializationTestObject() {
Ppcwmax ppcwmax;
return ppcwmax;
return Ppcwmax({{45.0, "YES"}});
}