Test fixture class for FunctionParserBase unit tests.
More...
#include <function_parser_base_tester.hpp>
|
| void | testIsPolynomial (const std::string &input, bool expected) |
| | Test the parseMethod method of ReaderBase.
|
| |
| void | testIsTrigonometric (const std::string &input, bool expected) |
| | Test the isTrigonometric method of FunctionParserBase.
|
| |
| void | testIcontains (const std::string &hay, const std::string &needle, bool expected) |
| | Test the icontains method of FunctionParserBase.
|
| |
| void | testRemoveSpaces (const std::string &input, const std::string &expected) |
| | Test the removeSpaces method of FunctionParserBase.
|
| |
| void | testSplitSignTokens (const std::string &input, const std::vector< std::string > &expected) |
| | Test the splitSignTokens method of FunctionParserBase.
|
| |
| void | testParseOptionalCoefficient (const std::string &input, const std::pair< double, std::string > &expected) |
| | Test the parseOptionalCoefficient method of FunctionParserBase.
|
| |
| void | testParseFunction (const std::string &input, const std::function< double(double)> &expected, double test_value, double tolerance) |
| | Test the parseFunction method of FunctionParserBase.
|
| |
Test fixture class for FunctionParserBase unit tests.
◆ testIcontains()
| void FunctionParserBaseTester::testIcontains |
( |
const std::string & |
hay, |
|
|
const std::string & |
needle, |
|
|
bool |
expected |
|
) |
| |
|
inline |
Test the icontains method of FunctionParserBase.
- Parameters
-
| hay | The string to search within. |
| needle | The substring to search for. |
| expected | The expected boolean result. |
◆ testIsPolynomial()
| void FunctionParserBaseTester::testIsPolynomial |
( |
const std::string & |
input, |
|
|
bool |
expected |
|
) |
| |
|
inline |
Test the parseMethod method of ReaderBase.
- Parameters
-
| input | The input string representing a Method. |
| expected | The expected Method enum value. |
◆ testIsTrigonometric()
| void FunctionParserBaseTester::testIsTrigonometric |
( |
const std::string & |
input, |
|
|
bool |
expected |
|
) |
| |
|
inline |
Test the isTrigonometric method of FunctionParserBase.
- Parameters
-
| input | The input string representing a function. |
| expected | The expected boolean result indicating if the function is trigonometric. |
◆ testParseFunction()
| void FunctionParserBaseTester::testParseFunction |
( |
const std::string & |
input, |
|
|
const std::function< double(double)> & |
expected, |
|
|
double |
test_value, |
|
|
double |
tolerance |
|
) |
| |
|
inline |
Test the parseFunction method of FunctionParserBase.
- Parameters
-
| input | The input function string to parse. |
| expected | The expected std::function<double(double)> result. |
| test_value | A value to test the parsed function. |
| tolerance | The acceptable tolerance for floating-point comparison. |
◆ testParseOptionalCoefficient()
| void FunctionParserBaseTester::testParseOptionalCoefficient |
( |
const std::string & |
input, |
|
|
const std::pair< double, std::string > & |
expected |
|
) |
| |
|
inline |
Test the parseOptionalCoefficient method of FunctionParserBase.
- Parameters
-
| input | The input token string to parse. |
| expected | The expected pair of coefficient and remaining string. |
◆ testRemoveSpaces()
| void FunctionParserBaseTester::testRemoveSpaces |
( |
const std::string & |
input, |
|
|
const std::string & |
expected |
|
) |
| |
|
inline |
Test the removeSpaces method of FunctionParserBase.
- Parameters
-
| input | The input string with potential spaces. |
| expected | The expected string with spaces removed. |
◆ testSplitSignTokens()
| void FunctionParserBaseTester::testSplitSignTokens |
( |
const std::string & |
input, |
|
|
const std::vector< std::string > & |
expected |
|
) |
| |
|
inline |
Test the splitSignTokens method of FunctionParserBase.
- Parameters
-
| input | The input string to be split. |
| expected | The expected vector of tokens after splitting. |
The documentation for this class was generated from the following file: