HHH-15228 test showing round() works with BigDecimal

This commit is contained in:
Gavin King 2024-11-24 20:16:42 +01:00
parent 030e1fdc25
commit 53922d31b3
1 changed files with 2 additions and 0 deletions

View File

@ -525,6 +525,8 @@ public class FunctionTests {
.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(