summaryrefslogtreecommitdiff
path: root/tests/unit/core
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-01-27 20:54:23 +0100
committerSébastien Helleu <flashcode@flashtux.org>2020-01-27 20:54:23 +0100
commitd91d1ebb8cf7e9e11a4067ef7b942a7b8742037c (patch)
treedf112f2ddfee0f044c9f27cb1491e7a9536c6304 /tests/unit/core
parentf9808203956063cd83d9c51ad336f0bfe35beed5 (diff)
downloadweechat-d91d1ebb8cf7e9e11a4067ef7b942a7b8742037c.zip
tests: add other calc tests with multiple operators
The order of operators are different from the initial test, so this increases the code coverage in wee-calc.c.
Diffstat (limited to 'tests/unit/core')
-rw-r--r--tests/unit/core/test-core-calc.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit/core/test-core-calc.cpp b/tests/unit/core/test-core-calc.cpp
index 474fa21a6..53f5beaca 100644
--- a/tests/unit/core/test-core-calc.cpp
+++ b/tests/unit/core/test-core-calc.cpp
@@ -122,6 +122,9 @@ TEST(CoreCalc, Expression)
/* multiple operators */
WEE_CHECK_CALC("11", "5+2*3");
+ WEE_CHECK_CALC("11", "2*3+5");
+ WEE_CHECK_CALC("7", "5+2*3/3");
+ WEE_CHECK_CALC("7", "2*3/3+5");
/* expressions with decimal numbers */
WEE_CHECK_CALC("12.5", "10.5+2");