blob: 24d2ac519fd96166f0cb44e9dc9a68bc9679d76f [file] [log] [blame]
Michal Orzelb3e03d22024-06-28 13:55:47 +02001#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
10template <class Param>
11void PrintTo(const std::vector<Param>& vec, std::ostream* os);
12
13inline 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
20inline 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
28inline void PrintTo(const ReportAction& action, std::ostream* os)
29{
30 *os << utils::enumToString(action);
31}