Skip to content

Commit

Permalink
HHH-15228 test showing round() works with BigDecimal
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Nov 24, 2024
1 parent 030e1fd commit 53922d3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,8 @@ public void testMathFunctions(SessionFactoryScope scope) {
.list();
session.createQuery("select round(cast(e.theDouble as BigDecimal), 3) from EntityOfBasics e", BigDecimal.class)
.list();
assertThat( session.createQuery("select round(1.2345bd, 2)").getSingleResult(),
isOneOf(BigDecimal.valueOf(1.23), BigDecimal.valueOf(1.2300)) );
assertThat( session.createQuery("select abs(-2)", Integer.class).getSingleResult(), is(2) );
assertThat( session.createQuery("select sign(-2)", Integer.class).getSingleResult(), is(-1) );
assertThat(
Expand Down

0 comments on commit 53922d3

Please sign in to comment.