![]() |
calculator (Windows) - unit tests 1.1.1
calculator - Unit Tests
|
#include "gtest/gtest.h"#include "../../calculator/header/expressionParser.h"#include <stdexcept>Go to the source code of this file.
Classes | |
| class | ExpressionParserTest |
Functions | |
| TEST_F (ExpressionParserTest, AddsTwoIntegers) | |
| TEST_F (ExpressionParserTest, SubtractsTwoIntegers) | |
| TEST_F (ExpressionParserTest, MultipliesTwoIntegers) | |
| TEST_F (ExpressionParserTest, DividesTwoIntegers) | |
| TEST_F (ExpressionParserTest, HandlesMultiDigitNumbers) | |
| TEST_F (ExpressionParserTest, IgnoresWhitespaceBetweenTokens) | |
| TEST_F (ExpressionParserTest, MultiplicationBindsTighterThanAddition) | |
| TEST_F (ExpressionParserTest, DivisionBindsTighterThanSubtraction) | |
| TEST_F (ExpressionParserTest, SameLevelOperatorsAreLeftAssociative) | |
| TEST_F (ExpressionParserTest, ParenthesesOverridePrecedence) | |
| TEST_F (ExpressionParserTest, NestedParenthesesAreSupported) | |
| TEST_F (ExpressionParserTest, AddsDecimalNumbers) | |
| TEST_F (ExpressionParserTest, HandlesLeadingAndTrailingDecimalPoint) | |
| TEST_F (ExpressionParserTest, DecimalPrecisionIsPreserved) | |
| TEST_F (ExpressionParserTest, EmptyExpressionThrows) | |
| TEST_F (ExpressionParserTest, WhitespaceOnlyExpressionThrows) | |
| TEST_F (ExpressionParserTest, ExpressionEndingWithOperatorThrows) | |
| TEST_F (ExpressionParserTest, MissingLeftOperandThrows) | |
| TEST_F (ExpressionParserTest, TwoNumbersWithoutOperatorThrows) | |
| TEST_F (ExpressionParserTest, MissingOperatorBeforeParenthesisThrows) | |
| TEST_F (ExpressionParserTest, EmptyParenthesesThrow) | |
| TEST_F (ExpressionParserTest, OperatorBeforeClosingParenthesisThrows) | |
| TEST_F (ExpressionParserTest, UnmatchedClosingParenthesisThrows) | |
| TEST_F (ExpressionParserTest, UnmatchedOpeningParenthesisThrows) | |
| TEST_F (ExpressionParserTest, TwoDecimalPointsInOneNumberThrows) | |
| TEST_F (ExpressionParserTest, LoneDecimalPointThrows) | |
| TEST_F (ExpressionParserTest, UnexpectedCharacterThrows) | |
| TEST_F (ExpressionParserTest, UnsupportedOperatorCharacterThrows) | |
| TEST_F (ExpressionParserTest, DivisionByZeroThrows) | |
| TEST_F (ExpressionParserTest, EvaluatePostfixWithTooFewOperandsThrows) | |
| TEST_F (ExpressionParserTest, EvaluatePostfixWithLeftoverOperandsThrows) | |
| TEST_F (ExpressionParserTest, EvaluatePostfixWithInvalidTokenThrows) | |
| TEST_F (ExpressionParserTest, ToPostfixProducesReversePolishNotation) | |
| TEST_F | ( | ExpressionParserTest | , |
| AddsDecimalNumbers | ) |
Definition at line 90 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| AddsTwoIntegers | ) |
Definition at line 30 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| DecimalPrecisionIsPreserved | ) |
Definition at line 99 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| DividesTwoIntegers | ) |
Definition at line 42 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| DivisionBindsTighterThanSubtraction | ) |
Definition at line 63 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| DivisionByZeroThrows | ) |
Definition at line 170 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| EmptyExpressionThrows | ) |
Definition at line 107 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| EmptyParenthesesThrow | ) |
Definition at line 132 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| EvaluatePostfixWithInvalidTokenThrows | ) |
Definition at line 187 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| EvaluatePostfixWithLeftoverOperandsThrows | ) |
Definition at line 183 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| EvaluatePostfixWithTooFewOperandsThrows | ) |
Definition at line 179 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| ExpressionEndingWithOperatorThrows | ) |
Definition at line 115 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| HandlesLeadingAndTrailingDecimalPoint | ) |
Definition at line 94 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| HandlesMultiDigitNumbers | ) |
Definition at line 46 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| IgnoresWhitespaceBetweenTokens | ) |
Definition at line 50 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| LoneDecimalPointThrows | ) |
Definition at line 152 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| MissingLeftOperandThrows | ) |
Definition at line 119 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| MissingOperatorBeforeParenthesisThrows | ) |
Definition at line 128 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| MultiplicationBindsTighterThanAddition | ) |
Definition at line 58 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| MultipliesTwoIntegers | ) |
Definition at line 38 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| NestedParenthesesAreSupported | ) |
Definition at line 81 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| OperatorBeforeClosingParenthesisThrows | ) |
Definition at line 136 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| ParenthesesOverridePrecedence | ) |
Definition at line 76 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| SameLevelOperatorsAreLeftAssociative | ) |
Definition at line 67 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| SubtractsTwoIntegers | ) |
Definition at line 34 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| ToPostfixProducesReversePolishNotation | ) |
Definition at line 195 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| TwoDecimalPointsInOneNumberThrows | ) |
Definition at line 148 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| TwoNumbersWithoutOperatorThrows | ) |
Definition at line 124 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| UnexpectedCharacterThrows | ) |
Definition at line 157 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| UnmatchedClosingParenthesisThrows | ) |
Definition at line 140 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| UnmatchedOpeningParenthesisThrows | ) |
Definition at line 144 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| UnsupportedOperatorCharacterThrows | ) |
Definition at line 166 of file expressionParser_test.cpp.
| TEST_F | ( | ExpressionParserTest | , |
| WhitespaceOnlyExpressionThrows | ) |
Definition at line 111 of file expressionParser_test.cpp.