Skip to content

Commit

Permalink
Additional information failed correctness test
Browse files Browse the repository at this point in the history
  • Loading branch information
gstamatelat committed Aug 15, 2022
1 parent e927037 commit 3cead61
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/java/gr/james/sampling/RandomSamplingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public void correctness() {
int c = d.get(i);
final double expected = (double) REPS * Math.min(SAMPLE, STREAM) / STREAM;
final double actual = (double) c;
assertEquals(String.format("Correctness failed for streamSize %d", STREAM), 1, actual / expected, 1e-2);
assertEquals(
String.format("Correctness failed for streamSize %d and frequencies %s", STREAM, d),
1, actual / expected, 1e-2
);
}
}
}
Expand Down

0 comments on commit 3cead61

Please sign in to comment.