ROOT
ROOT project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FunctionParserBaseTester Class Reference

Test fixture class for FunctionParserBase unit tests. More...

#include <function_parser_base_tester.hpp>

Inheritance diagram for FunctionParserBaseTester:
Inheritance graph
Collaboration diagram for FunctionParserBaseTester:
Collaboration graph

Public Member Functions

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.
 

Detailed Description

Test fixture class for FunctionParserBase unit tests.

Member Function Documentation

◆ testIcontains()

void FunctionParserBaseTester::testIcontains ( const std::string &  hay,
const std::string &  needle,
bool  expected 
)
inline

Test the icontains method of FunctionParserBase.

Parameters
hayThe string to search within.
needleThe substring to search for.
expectedThe expected boolean result.
Here is the call graph for this function:

◆ testIsPolynomial()

void FunctionParserBaseTester::testIsPolynomial ( const std::string &  input,
bool  expected 
)
inline

Test the parseMethod method of ReaderBase.

Parameters
inputThe input string representing a Method.
expectedThe expected Method enum value.
Here is the call graph for this function:

◆ testIsTrigonometric()

void FunctionParserBaseTester::testIsTrigonometric ( const std::string &  input,
bool  expected 
)
inline

Test the isTrigonometric method of FunctionParserBase.

Parameters
inputThe input string representing a function.
expectedThe expected boolean result indicating if the function is trigonometric.
Here is the call graph for this function:

◆ 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
inputThe input function string to parse.
expectedThe expected std::function<double(double)> result.
test_valueA value to test the parsed function.
toleranceThe acceptable tolerance for floating-point comparison.
Here is the call graph for this function:

◆ testParseOptionalCoefficient()

void FunctionParserBaseTester::testParseOptionalCoefficient ( const std::string &  input,
const std::pair< double, std::string > &  expected 
)
inline

Test the parseOptionalCoefficient method of FunctionParserBase.

Parameters
inputThe input token string to parse.
expectedThe expected pair of coefficient and remaining string.
Here is the call graph for this function:

◆ testRemoveSpaces()

void FunctionParserBaseTester::testRemoveSpaces ( const std::string &  input,
const std::string &  expected 
)
inline

Test the removeSpaces method of FunctionParserBase.

Parameters
inputThe input string with potential spaces.
expectedThe expected string with spaces removed.
Here is the call graph for this function:

◆ testSplitSignTokens()

void FunctionParserBaseTester::testSplitSignTokens ( const std::string &  input,
const std::vector< std::string > &  expected 
)
inline

Test the splitSignTokens method of FunctionParserBase.

Parameters
inputThe input string to be split.
expectedThe expected vector of tokens after splitting.
Here is the call graph for this function:

The documentation for this class was generated from the following file: