Skip to content

Commit

Permalink
Add missing precision on double equality assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
ccleva committed Jan 3, 2025
1 parent 489727c commit a0c3e27
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@ void testMultipleColumnTypes() {
Table table = Table.create("test", booleanColumn, numberColumn);
Table summary = table.summarize(booleanColumn, numberColumn, countTrue, stdDev).by(stringColumn);

assertEquals(2.0, summary.doubleColumn(1).get(0), "Wrong summary");
assertEquals(0.0, summary.doubleColumn(1).get(1), "Wrong summary");
assertEquals(Math.sqrt(2), summary.doubleColumn(2).get(0), "Wrong summary");
assertEquals(Math.sqrt(2), summary.doubleColumn(2).get(1), "Wrong summary");
assertEquals(2.0, summary.doubleColumn(1).get(0), 1e-6, "Wrong summary");
assertEquals(0.0, summary.doubleColumn(1).get(1), 1e-6, "Wrong summary");
assertEquals(Math.sqrt(2), summary.doubleColumn(2).get(0), 1e-6, "Wrong summary");
assertEquals(Math.sqrt(2), summary.doubleColumn(2).get(1), 1e-6, "Wrong summary");
}

@Test
Expand Down

0 comments on commit a0c3e27

Please sign in to comment.