1#ifndef READER_BASE_TESTER_HPP
2#define READER_BASE_TESTER_HPP
4#include <gtest/gtest.h>
20 void testTrim(
const std::string& input,
const std::string& expected) {
33 EXPECT_EQ(value, expected);
45 EXPECT_DOUBLE_EQ(value, expected);
57 EXPECT_EQ(value, expected);
69 EXPECT_EQ(method, expected);
Test fixture class for ReaderBase unit tests.
Definition reader_base_tester.hpp:12
void testParseMethod(const std::string &input, const Method &expected)
Test the parseMethod method of ReaderBase.
Definition reader_base_tester.hpp:66
void testParseBool(const std::string &input, const bool &expected)
Test the parseBool method of ReaderBase.
Definition reader_base_tester.hpp:30
void testParseDouble(const std::string &input, const double &expected)
Test the parseDouble method of ReaderBase.
Definition reader_base_tester.hpp:42
void testParseInt(const std::string &input, const int &expected)
Test the parseInt method of ReaderBase.
Definition reader_base_tester.hpp:54
void testTrim(const std::string &input, const std::string &expected)
Test the trim method of ReaderBase.
Definition reader_base_tester.hpp:20
static bool parseBool(const std::string &bool_str, bool &out)
Helper static method to parse a boolean value from a string.
Definition reader.cpp:26
static bool parseInt(const std::string &int_str, int &out)
Helper static method to parse an integer value from a string.
Definition reader.cpp:51
static std::string trim(const std::string &untrimmed_str)
Helper static method to trim leading and trailing whitespace from a string.
Definition reader.cpp:14
static bool parseMethod(const std::string &method_str, Method &out)
Helper static method to parse a Method enum value from a string.
Definition reader.cpp:61
static bool parseDouble(const std::string &double_str, double &out)
Helper static method to parse a double value from a string.
Definition reader.cpp:41
Method
Enumeration of available root-finding methods.
Definition method.hpp:8
Reader classes for reading configuration from files.