Home
last modified time | relevance | path

Searched refs:stats (Results 1 – 5 of 5) sorted by relevance

/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DSummaryStatisticsTest.java52 for (IntSummaryStatistics stats : instances) { in testIntStatistics()
53 assertEquals(stats.getCount(), 1000); in testIntStatistics()
54 assertEquals(stats.getSum(), countTo(1000).stream().mapToInt(i -> i).sum()); in testIntStatistics()
55 assertEquals(stats.getMax(), 1000); in testIntStatistics()
56 assertEquals(stats.getMin(), 1); in testIntStatistics()
67 for (LongSummaryStatistics stats : instances) { in testLongStatistics()
68 assertEquals(stats.getCount(), 1000); in testLongStatistics()
69 assertEquals(stats.getSum(), (long) countTo(1000).stream().mapToInt(i -> i).sum()); in testLongStatistics()
70 assertEquals(stats.getMax(), 1000L); in testLongStatistics()
71 assertEquals(stats.getMin(), 1L); in testLongStatistics()
[all …]
DCollectAndSummaryStatisticsTest.java108 for (IntSummaryStatistics stats : instances) { in testIntStatistics()
109 assertEquals(stats.getCount(), 1000); in testIntStatistics()
110 assertEquals(stats.getSum(), countTo(1000).stream().mapToInt(i -> i).sum()); in testIntStatistics()
111 assertEquals(stats.getAverage(), (double) stats.getSum() / stats.getCount()); in testIntStatistics()
112 assertEquals(stats.getMax(), 1000); in testIntStatistics()
113 assertEquals(stats.getMin(), 1); in testIntStatistics()
142 for (LongSummaryStatistics stats : instances) { in testLongStatistics()
143 assertEquals(stats.getCount(), 1000); in testLongStatistics()
144 assertEquals(stats.getSum(), (long) countTo(1000).stream().mapToInt(i -> i).sum()); in testLongStatistics()
145 assertEquals(stats.getAverage(), (double) stats.getSum() / stats.getCount()); in testLongStatistics()
[all …]
/libcore/ojluni/src/test/java/util/Random/
DRandomTestBsi1999.java161 int[] stats = new int[16]; in pokerTest() local
166 ++stats[v]; in pokerTest()
171 for (int k = 0; k < stats.length; k++) { in pokerTest()
172 z += stats[k]*stats[k]; in pokerTest()
209 int[][] stats = new int[2][8]; in runTestAndLongRunTest() local
214 ++stats[s[j]][(count < 6) ? count : (count < 34) ? 6 : 7]; in runTestAndLongRunTest()
218 stats[0][6] += stats[0][7]; in runTestAndLongRunTest()
219 stats[1][6] += stats[1][7]; in runTestAndLongRunTest()
220 int runFailure = checkRunStats(stats[0]) | checkRunStats(stats[1]); in runTestAndLongRunTest()
222 int longRunFailure = ((stats[0][7] == 0) && (stats[1][7] == 0)) ? 0 : 1; in runTestAndLongRunTest()
[all …]
DRandomTestChiSquared.java128 int[] stats = new int[N]; in chiSquaredTest() local
132 ++stats[v]; in chiSquaredTest()
135 for (int k = 0; k < stats.length; k++) { in chiSquaredTest()
136 z += stats[k]*stats[k]; in chiSquaredTest()
/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java81 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testForCompenstation() local
85 failures += compareUlpDifference(expectedSum, stats.getSum(), 3); in testForCompenstation()
86 failures += compareUlpDifference(expectedAvg, stats.getAverage(), 3); in testForCompenstation()
130 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testNonfiniteSum() local
134 failures += compareUlpDifference(expected, stats.getSum(), 0); in testNonfiniteSum()
135 failures += compareUlpDifference(expected, stats.getAverage(), 0); in testNonfiniteSum()