1 #pragma once
2 
3 #include "types/readings.hpp"
4 #include "types/report_action.hpp"
5 
6 #include <ostream>
7 
8 #include <gmock/gmock.h>
9 
10 template <class Param>
11 void PrintTo(const std::vector<Param>& vec, std::ostream* os);
12 
PrintTo(const ReadingData & data,std::ostream * os)13 inline void PrintTo(const ReadingData& data, std::ostream* os)
14 {
15     const auto& [id, value, timestamp] = data;
16     *os << "( " << id << ", " << std::to_string(value) << ", "
17         << std::to_string(timestamp) << " )";
18 }
19 
PrintTo(const Readings & readings,std::ostream * os)20 inline void PrintTo(const Readings& readings, std::ostream* os)
21 {
22     const auto& [timestamp, readingDataVec] = readings;
23     *os << "( " << std::to_string(timestamp) << ", ";
24     PrintTo(readingDataVec, os);
25     *os << " )";
26 }
27 
PrintTo(const ReportAction & action,std::ostream * os)28 inline void PrintTo(const ReportAction& action, std::ostream* os)
29 {
30     *os << utils::enumToString(action);
31 }
32