Browse Source

Fixed some test.

Former-commit-id: 9750284b59
tempestpy_adaptions
dehnert 10 years ago
parent
commit
01d7bce205
  1. 4
      test/functional/storage/ExpressionEvalutionTest.cpp

4
test/functional/storage/ExpressionEvalutionTest.cpp

@ -50,13 +50,13 @@ TEST(ExpressionEvaluation, ExprTkEvaluation) {
eval.setBooleanValue(x, true);
for (int_fast64_t i = 0; i < 1000; ++i) {
eval.setIntegerValue(y, 3 + i);
EXPECT_NEAR(8.5 + i, eval.asDouble(iteExpression), 1e-6);
EXPECT_NEAR(8.5 + i, eval.asRational(iteExpression), 1e-6);
}
eval.setBooleanValue(x, false);
for (int_fast64_t i = 0; i < 1000; ++i) {
double zValue = i / static_cast<double>(10);
eval.setRationalValue(z, zValue);
EXPECT_NEAR(3 * zValue, eval.asDouble(iteExpression), 1e-6);
EXPECT_NEAR(3 * zValue, eval.asRational(iteExpression), 1e-6);
}
}
Loading…
Cancel
Save