Skip to content

Commit

Permalink
refs #5633. Fix test precision issue on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jul 23, 2012
1 parent dbb8db8 commit fe70e69
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ class ProductLinearExpTest : public CxxTest::TestSuite
double x = xValues[i];
// Mimic workings of ProductLinearExp function to product comparison output.
double expected = ((A1 * x) + A0)* Height * std::exp(-x/Lifetime);
TS_ASSERT_EQUALS(expected, valuesLinExpDecay[i]);
TS_ASSERT_DELTA(expected, valuesLinExpDecay[i], 0.0001);

// As a complete check, verify that the output is also the same for the Linear algorithm.
TS_ASSERT_EQUALS(valuesLinear[i], valuesLinExpDecay[i]);
TS_ASSERT_DELTA(valuesLinear[i], valuesLinExpDecay[i], 0.0001);
}
}

Expand Down Expand Up @@ -162,9 +162,9 @@ class ProductLinearExpTest : public CxxTest::TestSuite
double x = xValues[i];
// Mimic workings of ProductLinearExp function to product comparison output.
double expected = ((A1 * x) + A0)* Height * std::exp(-x/Lifetime);
TS_ASSERT_EQUALS(expected, valuesLinExpDecay[i]);
TS_ASSERT_DELTA(expected, valuesLinExpDecay[i], 0.0001);
// As a complete check, verify that the output is also the same for the ExpDecay algorithm.
TS_ASSERT_EQUALS(valuesExpDecay[i], valuesLinExpDecay[i]);
TS_ASSERT_DELTA(valuesExpDecay[i], valuesLinExpDecay[i], 0.0001);
}
}

Expand Down

0 comments on commit fe70e69

Please sign in to comment.