EMath++
Classes for mathematical concepts
Loading...
Searching...
No Matches
eparser.cpp File Reference

This is the main test file for the equation parser. More...

#include <gtest/gtest.h>
#include "eparser.h"
+ Include dependency graph for eparser.cpp:

Go to the source code of this file.

Classes

class  EParserTest
 Class that provides a test fixture for the test cases. More...
 

Functions

 TEST_F (EParserTest, Lexer)
 
 TEST_F (EParserTest, CompoundLexer)
 
 TEST_F (EParserTest, ArithmeticLexer)
 
 TEST_F (EParserTest, Variables)
 
 TEST_F (EParserTest, Compound)
 
 TEST_F (EParserTest, Signs)
 
 TEST_F (EParserTest, Noise)
 
 TEST_F (EParserTest, Edge)
 
int main (int argc, char **argv)
 Function that runs all the declared tests.
 

Detailed Description

This is the main test file for the equation parser.

This file contains a text fixture class and all the test cases.
It consists of the EParserTest classe that provides the test fixture for all the tests.
Then it contains all the test cases, for testing correct execution.

Definition in file eparser.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Function that runs all the declared tests.

Parameters
argcThe console arguments count
argvThe console arguments as a array of char arrays
Returns
(0) If all tests passed
(1) If one or more tests failed

Definition at line 169 of file eparser.cpp.

◆ TEST_F() [1/8]

TEST_F ( EParserTest  ,
ArithmeticLexer   
)
Test:
Test lexer functionality with arithmetic expressions

Definition at line 104 of file eparser.cpp.

References emthp::T_EOF, emthp::T_EXPONENT, emthp::T_NUMBER, emthp::T_VARIABLE, emthp::Token::type, and emthp::Token::value.

◆ TEST_F() [2/8]

TEST_F ( EParserTest  ,
Compound   
)
Test:
Test parser functionality with polynomial expressions

Definition at line 140 of file eparser.cpp.

◆ TEST_F() [3/8]

TEST_F ( EParserTest  ,
CompoundLexer   
)
Test:
Test lexer functionality with compund expressions

Definition at line 77 of file eparser.cpp.

References emthp::T_EOF, emthp::T_EXPONENT, emthp::T_NUMBER, emthp::T_VARIABLE, emthp::Token::type, and emthp::Token::value.

◆ TEST_F() [4/8]

TEST_F ( EParserTest  ,
Edge   
)
Test:
Test parser edge cases

Definition at line 161 of file eparser.cpp.

◆ TEST_F() [5/8]

TEST_F ( EParserTest  ,
Lexer   
)
Test:
Test lexer functionality with simple expressions

Definition at line 42 of file eparser.cpp.

References emthp::T_EOF, emthp::T_EXPONENT, emthp::T_MINUS, emthp::T_NUMBER, emthp::T_VARIABLE, emthp::Token::type, and emthp::Token::value.

◆ TEST_F() [6/8]

TEST_F ( EParserTest  ,
Noise   
)
Test:
Test parser functionality with noise in the expressions

Definition at line 154 of file eparser.cpp.

◆ TEST_F() [7/8]

TEST_F ( EParserTest  ,
Signs   
)
Test:
Test parser functionality with sign expressions

Definition at line 144 of file eparser.cpp.

◆ TEST_F() [8/8]

TEST_F ( EParserTest  ,
Variables   
)
Test:
Test parser functionality with monomial expressions

Definition at line 131 of file eparser.cpp.