Skip to content

Commit 6d48419

Browse files
committed
PropertyQuery tests: revert expected long max/min values for no results
1 parent d300104 commit 6d48419

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

tests/objectbox-java-test/src/test/java/io/objectbox/query/PropertyQueryTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -600,14 +600,14 @@ public void avgLong_noData() {
600600
@Test
601601
public void min_noData() {
602602
Query<TestEntity> baseQuery = box.query().build();
603-
assertEquals(0, baseQuery.property(simpleByte).min());
604-
assertEquals(0, baseQuery.property(simpleShort).min());
605-
assertEquals(0, baseQuery.property(simpleInt).min());
606-
assertEquals(0, baseQuery.property(simpleLong).min());
603+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleByte).min());
604+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleShort).min());
605+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleInt).min());
606+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleLong).min());
607607
// Integer treated as unsigned.
608-
assertEquals(0, baseQuery.property(simpleShortU).min());
609-
assertEquals(0, baseQuery.property(simpleIntU).min());
610-
assertEquals(0, baseQuery.property(simpleLongU).min());
608+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleShortU).min());
609+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleIntU).min());
610+
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleLongU).min());
611611
}
612612

613613
@Test
@@ -620,14 +620,14 @@ public void minDouble_noData() {
620620
@Test
621621
public void max_noData() {
622622
Query<TestEntity> baseQuery = box.query().build();
623-
assertEquals(0, baseQuery.property(simpleByte).max());
624-
assertEquals(0, baseQuery.property(simpleShort).max());
625-
assertEquals(0, baseQuery.property(simpleInt).max());
626-
assertEquals(0, baseQuery.property(simpleLong).max());
623+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleByte).max());
624+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleShort).max());
625+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleInt).max());
626+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleLong).max());
627627
// Integer treated as unsigned.
628-
assertEquals(0, baseQuery.property(simpleShortU).max());
629-
assertEquals(0, baseQuery.property(simpleIntU).max());
630-
assertEquals(0, baseQuery.property(simpleLongU).max());
628+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleShortU).max());
629+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleIntU).max());
630+
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleLongU).max());
631631
}
632632

633633
@Test
@@ -785,7 +785,7 @@ public void sum_unsignedLongOverflow_exception() {
785785
}
786786

787787
@Test
788-
public void sumDouble_positiveOverflow_exception() {
788+
public void sumDouble_positiveInfinity() {
789789
putTestEntityFloat(Float.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);
790790
putTestEntityFloat(1, 1);
791791

@@ -795,7 +795,7 @@ public void sumDouble_positiveOverflow_exception() {
795795
}
796796

797797
@Test
798-
public void sumDouble_negativeOverflow_exception() {
798+
public void sumDouble_negativeInfinity() {
799799
putTestEntityFloat(Float.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY);
800800
putTestEntityFloat(-1, -1);
801801

0 commit comments

Comments
 (0)