Package com.humaorie.dollar.ArrayWrapper

Examples of com.humaorie.dollar.ArrayWrapper.DoubleArrayWrapper.toDoubleArray()


    @Test
    public void unboxDoubleArray() {
        final Double[] boxed = {42.0};
        final double[] unboxed = {42};
        final DoubleArrayWrapper arrayWrapper = new DoubleArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toDoubleArray(), 0.1d);
    }

    @Test
    public void unboxDoubleArrayWithNullsLeadsToZero() {
        final Double[] boxed = {null};
View Full Code Here


    @Test
    public void unboxDoubleArrayWithNullsLeadsToZero() {
        final Double[] boxed = {null};
        final double[] unboxed = {0};
        final DoubleArrayWrapper arrayWrapper = new DoubleArrayWrapper(boxed);
        Assert.assertArrayEquals(unboxed, arrayWrapper.toDoubleArray(), 0.1d);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.