lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <dawid.we...@gmail.com>
Subject Re: svn commit: r1544504 - /lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java
Date Fri, 22 Nov 2013 12:24:29 GMT
This is a reversible conversion, Erick. So you can just take the raw
long value and convert it back to a double on any machine using
Double.longBitsToDouble (or something, didn't check for actual method
name).

In my opinion the test is depending on some ordering that fails under jdk8/ ibm.

Dawid

On Fri, Nov 22, 2013 at 1:08 PM,  <erick@apache.org> wrote:
> Author: erick
> Date: Fri Nov 22 12:08:01 2013
> New Revision: 1544504
>
> URL: http://svn.apache.org/r1544504
> Log:
> Added "human readable" output to the failing test.
>
> Modified:
>     lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java
>
> Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java
> URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java?rev=1544504&r1=1544503&r2=1544504&view=diff
> ==============================================================================
> --- lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java (original)
> +++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/analytics/NoFacetTest.java Fri
Nov 22 12:08:01 2013
> @@ -226,7 +226,9 @@ public class NoFacetTest extends Abstrac
>      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);
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message