Skip to content

Commit

Permalink
Test refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
gstamatelat committed Dec 26, 2017
1 parent 0edf484 commit ccdb363
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/test/java/gr/james/sampling/ChaoSamplingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ public class ChaoSamplingTest {
public void correctness() {
final int[] d = new int[STREAM];
for (int reps = 0; reps < REPS; reps++) {
final ChaoSampling<Integer> es = new ChaoSampling<>(SAMPLE, RANDOM);
final ChaoSampling<Integer> chao = new ChaoSampling<>(SAMPLE, RANDOM);
for (int i = 0; i < STREAM; i++) {
es.feed(i, i + 1);
chao.feed(i, i + 1);
}
for (int s : es.sample()) {
for (int s : chao.sample()) {
d[s]++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ public static Collection<Supplier<WeightedRandomSampling<Integer>>> implementati
public void correctness() {
final int[] d = new int[STREAM];
for (int reps = 0; reps < REPS; reps++) {
final WeightedRandomSampling<Integer> es = impl.get();
final WeightedRandomSampling<Integer> alg = impl.get();
for (int i = 0; i < STREAM; i++) {
es.feed(i, i + 1);
alg.feed(i, i + 1);
}
for (int s : es.sample()) {
for (int s : alg.sample()) {
d[s]++;
}
}
Expand Down

0 comments on commit ccdb363

Please sign in to comment.