From d91d1ebb8cf7e9e11a4067ef7b942a7b8742037c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 27 Jan 2020 20:54:23 +0100 Subject: [PATCH] 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. --- tests/unit/core/test-core-calc.cpp | 3 +++ 1 file changed, 3 insertions(+) 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");