Skip to content

Commit 8f1f13f

Browse files
committed
add an extra test for pad() function
1 parent ad9d5de commit 8f1f13f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/query/hql/FunctionTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,9 @@ public void testPadFunction(SessionFactoryScope scope) {
915915
is(".....hello"));
916916
assertThat(session.createQuery("select pad('hello' with 10 trailing '.')", String.class).getSingleResult(),
917917
is("hello....."));
918+
919+
assertThat(session.createQuery("select pad(:hello with 10 leading)", String.class).setParameter( "hello", "hello" ).getSingleResult(),
920+
is(" hello"));
918921
}
919922
);
920923

@@ -2020,6 +2023,10 @@ public void testIntervalDiffExpressions(SessionFactoryScope scope) {
20202023
session.createQuery("select (e.theDate - e.theDate) by day from EntityOfBasics e", Long.class)
20212024
.list();
20222025

2026+
//TODO
2027+
// session.createQuery("select (e.theDate - e.theDate) by week from EntityOfBasics e", Long.class)
2028+
// .list();
2029+
20232030
session.createQuery("select (e.theTimestamp - e.theTimestamp) by hour from EntityOfBasics e", Long.class)
20242031
.list();
20252032
session.createQuery("select (e.theTimestamp - e.theTimestamp) by minute from EntityOfBasics e", Long.class)

0 commit comments

Comments
 (0)