9#ifndef WRITER_TESTS_HPP
10#define WRITER_TESTS_HPP
12#include <gtest/gtest.h>
44 FAIL() <<
"Unknown WritingMethod";
52 EXPECT_NO_THROW(writer.
write());
60 EXPECT_TRUE(std::filesystem::exists(
"output.csv"));
61 std::filesystem::remove(
"output.csv");
65 EXPECT_TRUE(std::filesystem::exists(
"output.dat"));
66 std::filesystem::remove(
"output.dat");
70 EXPECT_TRUE(std::filesystem::exists(
"output.dat"));
71 std::filesystem::remove(
"output.dat");
72 EXPECT_TRUE(std::filesystem::exists(
"output.plt"));
73 std::filesystem::remove(
"output.plt");
74 EXPECT_TRUE(std::filesystem::exists(
"output.png"));
75 std::filesystem::remove(
"output.png");
78 FAIL() <<
"Unknown WritingMethod";
Abstract Printer class.
Definition writer_def.hpp:69
The class to print out the values in the CLI.
Definition writer_def.hpp:84
Class to write on .csv the result.
Definition writer_def.hpp:132
Class to write on .dat the result - daughter of FilePrinter and Mother of GnuPlotPrinter.
Definition writer_def.hpp:115
Class Daughter of PrinterDAT to write on .dat (inherited) and produce a gnu plot for the results.
Definition writer_def.hpp:155
Tester class for Writer class unit tests.
Definition writer_tester.hpp:22
void testBuildPrinter(const T &values, WritingMethod method, std::unique_ptr< PrinterBase< Eigen::Vector2d > > &printer)
Definition writer_tester.hpp:25
void testWrite(const T &values, WritingMethod method)
Definition writer_tester.hpp:49
Class to store required arguments and handle the printing flow.
Definition writer_def.hpp:33
void build_printer(std::unique_ptr< PrinterBase< V > > &printer)
Method to convert the generic Printer into a typed one for a specific output destination.
Definition writer.hpp:47
void write()
Method to run the printing loop and correctly initialize the Printer.
WritingMethod
Definition writer_def.hpp:24
@ CONSOLE
Definition writer_def.hpp:24
@ CSV
Definition writer_def.hpp:24
@ DAT
Definition writer_def.hpp:24
@ GNUPLOT
Definition writer_def.hpp:24