From 671a54cfa11a6e53fea1072d85c8689f45f8c7b3 Mon Sep 17 00:00:00 2001 From: Alexis Nowikowski Date: Wed, 22 Nov 2023 03:15:22 +0100 Subject: [PATCH] Test case for division of two double values bug --- .../4-Unit-Tests-Core/ExpressionTest.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/CURRENT/c-sharp/tests-and-release/4-Unit-Tests-Core/ExpressionTest.cs b/CURRENT/c-sharp/tests-and-release/4-Unit-Tests-Core/ExpressionTest.cs index b85861b3..c42e3a45 100644 --- a/CURRENT/c-sharp/tests-and-release/4-Unit-Tests-Core/ExpressionTest.cs +++ b/CURRENT/c-sharp/tests-and-release/4-Unit-Tests-Core/ExpressionTest.cs @@ -23059,6 +23059,21 @@ public void testExpr1402() { testResult = true; TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp); Assert.IsTrue(testResult); - } - } + } + [TestMethod] + public void testExpr1403() + { + TestCommonTools.testExprSettingsInit(); + bool testResult = false; + String expStr = "0.0000004566969933 / 36370.51937825058"; + TestCommonTools.consolePrintTestExprStart(1, expStr); + Expression testExp = new Expression(expStr); + double value = testExp.calculate(); + double reg = 0.0000004566969933 / 36370.51937825058; + if (value == reg) + testResult = true; + TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp); + Assert.IsTrue(testResult); + } + } } \ No newline at end of file