diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 20:54:23 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-01-27 20:54:23 +0100 |
commit | d91d1ebb8cf7e9e11a4067ef7b942a7b8742037c (patch) | |
tree | df112f2ddfee0f044c9f27cb1491e7a9536c6304 /tests/unit/core | |
parent | f9808203956063cd83d9c51ad336f0bfe35beed5 (diff) | |
download | weechat-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.cpp | 3 |
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"); |