Added "human readable" output to the failing test.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1544504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erick Erickson 2013-11-22 12:08:01 +00:00
parent 7b9ca4745a
commit 95b973d613
1 changed files with 3 additions and 1 deletions

View File

@ -226,7 +226,9 @@ public class NoFacetTest extends AbstractAnalyticsStatsTest {
Double floatTest = (Double)calculateNumberStat(floatTestStart, "stddev");
assertTrue("Oops: (double raws) " + Double.doubleToRawLongBits(floatResult) + " - "
+ Double.doubleToRawLongBits(floatTest) + " < " + Double.doubleToRawLongBits(.00000000001) +
" Calculated diff " + Double.doubleToRawLongBits(floatResult - floatTest),
" Calculated diff " + Double.doubleToRawLongBits(floatResult - floatTest)
+ " Let's see what the JVM thinks these bits are. FloatResult: " + floatResult.toString() +
" floatTest: " + floatTest.toString() + " Diff " + Double.toString(floatResult - floatTest),
Math.abs(floatResult - floatTest) < .00000000001);