use of java.util.DoubleSummaryStatistics in project j2objc by google.
the class DoubleSummaryStatisticsTest method test_empty.
public void test_empty() {
DoubleSummaryStatistics dss = new DoubleSummaryStatistics();
assertEquals(0, dss.getCount());
assertEquals(0.0d, dss.getSum());
assertEquals(0.0d, dss.getAverage());
assertEquals(Double.POSITIVE_INFINITY, dss.getMin());
assertEquals(Double.NEGATIVE_INFINITY, dss.getMax());
}
use of java.util.DoubleSummaryStatistics in project j2objc by google.
the class DoubleSummaryStatisticsTest method test_getMin.
public void test_getMin() {
DoubleSummaryStatistics dss1 = getDoubleSummaryStatisticsData1();
assertEquals(-53.4d, dss1.getMin());
dss1.accept(Double.NaN);
assertEquals(Double.NaN, dss1.getMin());
}
use of java.util.DoubleSummaryStatistics in project j2objc by google.
the class DoubleSummaryStatisticsTest method test_accept.
public void test_accept() {
DoubleSummaryStatistics dss = new DoubleSummaryStatistics();
dss.accept(100.5d);
assertEquals(1, dss.getCount());
assertEquals(100.5d, dss.getSum());
dss.accept(45.0d);
assertEquals(2, dss.getCount());
assertEquals(145.5d, dss.getSum());
}
use of java.util.DoubleSummaryStatistics in project j2objc by google.
the class DoubleSummaryStatisticsTest method test_getMax.
public void test_getMax() {
DoubleSummaryStatistics dss1 = getDoubleSummaryStatisticsData1();
assertEquals(100.0d, dss1.getMax());
dss1.accept(Double.NaN);
assertEquals(Double.NaN, dss1.getMax());
}
use of java.util.DoubleSummaryStatistics in project j2objc by google.
the class DoubleSummaryStatisticsTest method test_getSum.
public void test_getSum() {
DoubleSummaryStatistics dss1 = getDoubleSummaryStatisticsData1();
assertEquals(148.4, dss1.getSum());
dss1.accept(Double.NaN);
assertEquals(Double.NaN, dss1.getSum());
}
Aggregations