Skip to content

Commit

Permalink
Tests related to #261
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuszgromada committed May 29, 2022
1 parent dd51a75 commit 4bf6be3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions CURRENT/c-sharp/tests-and-release/4-Unit-Tests/ExpressionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22264,6 +22264,34 @@ public void TestExpr1355() {
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assert.IsTrue(testResult);
}
[TestMethod]
public void TestExpr1356() {
TestCommonTools.testExprSettingsInit();
bool testResult = false;
String expStr = "1^1!^2^^2!^^2!^^92^B32.252cerf^9292";
TestCommonTools.consolePrintTestExprStart(1356, expStr);
Expression testExp = new Expression(expStr);
double value = testExp.calculate();
double reg = 1;
if (MathFunctions.abs(reg - value) <= 1e-14)
testResult = true;
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assert.IsTrue(testResult);
}
[TestMethod]
public void TestExpr1357() {
TestCommonTools.testExprSettingsInit();
bool testResult = false;
String expStr = "6^^6^^2.116^B18.08";
TestCommonTools.consolePrintTestExprStart(1357, expStr);
Expression testExp = new Expression(expStr);
double value = testExp.calculate();
double reg = Double.PositiveInfinity;
if (value == reg)
testResult = true;
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assert.IsTrue(testResult);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22243,4 +22243,32 @@ public void testExpr1355() {
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assertions.assertTrue(testResult);
}
@Test
public void testExpr1356() {
TestCommonTools.testExprSettingsInit();
boolean testResult = false;
String expStr = "1^1!^2^^2!^^2!^^92^B32.252cerf^9292";
TestCommonTools.consolePrintTestExprStart(1356, expStr);
Expression testExp = new Expression(expStr);
double value = testExp.calculate();
double reg = 1;
if (MathFunctions.abs(reg - value) <= 1e-14)
testResult = true;
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assertions.assertTrue(testResult);
}
@Test
public void testExpr1357() {
TestCommonTools.testExprSettingsInit();
boolean testResult = false;
String expStr = "6^^6^^2.116^B18.08";
TestCommonTools.consolePrintTestExprStart(1357, expStr);
Expression testExp = new Expression(expStr);
double value = testExp.calculate();
double reg = Double.POSITIVE_INFINITY;
if (value == reg)
testResult = true;
TestCommonTools.consolePrintTestExprEnd(value, reg, testResult, testExp);
Assertions.assertTrue(testResult);
}
}

0 comments on commit 4bf6be3

Please sign in to comment.