Add regression tests to the round Expression function

This commit is contained in:
Madeline Miller 2023-05-21 15:09:38 +10:00
parent 237ebc1016
commit bd9af40e83
No known key found for this signature in database
GPG Key ID: B8EA2E5693115D81

View File

@ -427,4 +427,13 @@ class ExpressionTest extends BaseExpressionTest {
assertTrue(e.getMessage().contains("Calculations exceeded time limit"));
}
@Test
public void testRound() {
checkTestCase("round(1.3)", 1);
checkTestCase("round(0.9)", 1);
checkTestCase("round(-1.1)", -1);
checkTestCase("round(-0.9)", -1);
checkTestCase("round(1.5)", 2);
checkTestCase("round(-1.5)", -1);
}
}