From a6e859b7ff0af50f5fbc3a81ff732ed4e8be8625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 7 Jun 2025 09:45:15 +0200 Subject: [PATCH] tests: add test with a float number using a lot of decimals in calculation of expression This test validates the fix made in commit 5b4820ab06aa84a6a204cd3a2e8af9a4edad8f22 and will prevent regression with such numbers. --- tests/unit/core/test-core-calc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/unit/core/test-core-calc.cpp b/tests/unit/core/test-core-calc.cpp index 3bf2a46fb..9adc431a0 100644 --- a/tests/unit/core/test-core-calc.cpp +++ b/tests/unit/core/test-core-calc.cpp @@ -344,6 +344,7 @@ TEST(CoreCalc, Expression) WEE_CHECK_CALC("0.0000000008", "1/1234567890"); WEE_CHECK_CALC("0.0000000001", "1/12345678901"); WEE_CHECK_CALC("0", "1/123456789012"); + WEE_CHECK_CALC("1.2222222222", "1+0.22222222222222222222222222222222222"); /* expressions with parentheses */ WEE_CHECK_CALC("6", "((6))");