Skip to content

Commit

Permalink
count Nan fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Aug 20, 2023
1 parent 6a47608 commit 6b2e514
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,15 @@ public void getDictionary() {
assertEquals((double) i, d[i], 0.0);
}

@Test(expected = NullPointerException.class)
@Test()
public void getNan() {
m.increment(Double.NaN);
m.getId(Double.NaN);
assertEquals(0, m.getId(Double.NaN));
m.increment(Double.NaN);
assertEquals(0, m.getId(Double.NaN));
m.increment(1.0);
assertEquals(0, m.getId(Double.NaN));
m.increment(Double.NaN);
assertEquals(0, m.getId(Double.NaN));
}
}

0 comments on commit 6b2e514

Please sign in to comment.