Adding debug information to diagnose failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1543796 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Erick Erickson 2013-11-20 12:09:24 +00:00
parent fe2e612ebd
commit 915977b6e8
1 changed files with 7 additions and 1 deletions

View File

@ -225,7 +225,13 @@ public class NoFacetTest extends AbstractAnalyticsStatsTest {
Double floatResult = (Double)getStatResult(response, "str", "double", "float_fd"); Double floatResult = (Double)getStatResult(response, "str", "double", "float_fd");
Double floatTest = (Double)calculateNumberStat(floatTestStart, "stddev"); Double floatTest = (Double)calculateNumberStat(floatTestStart, "stddev");
assertTrue(Math.abs(floatResult-floatTest)<.00000000001); assertTrue(Math.abs(floatResult-floatTest)<.00000000001);
assertTrue("Oops: (double raws) " + Double.doubleToRawLongBits(floatResult) + " - "
+ Double.doubleToRawLongBits(floatTest) + " < " + Double.doubleToRawLongBits(.00000000001) +
" Calculated diff " + Double.doubleToRawLongBits(floatResult - floatTest),
Math.abs(floatResult - floatTest) < .00000000001);
//Double //Double
Double doubleResult = (Double)getStatResult(response, "str", "double", "double_dd"); Double doubleResult = (Double)getStatResult(response, "str", "double", "double_dd");
Double doubleTest = (Double)calculateNumberStat(doubleTestStart, "stddev"); Double doubleTest = (Double)calculateNumberStat(doubleTestStart, "stddev");