Skip to content

Commit e9844fc

Browse files
PropertyQueryTest: no data avg for integers is [0.0 -> NaN].
1 parent 52df196 commit e9844fc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,13 +541,13 @@ public void sum_notSupported() {
541541
public void avg_noData() {
542542
Query<TestEntity> baseQuery = box.query().build();
543543
// Integer.
544-
assertEquals(0, baseQuery.property(simpleByte).avg(), 0.0001);
545-
assertEquals(0, baseQuery.property(simpleShort).avg(), 0.0001);
546-
assertEquals(0, baseQuery.property(simpleInt).avg(), 0.0001);
547-
assertEquals(0, baseQuery.property(simpleLong).avg(), 0.0001);
544+
assertEquals(Double.NaN, baseQuery.property(simpleByte).avg(), 0.0);
545+
assertEquals(Double.NaN, baseQuery.property(simpleShort).avg(), 0.0);
546+
assertEquals(Double.NaN, baseQuery.property(simpleInt).avg(), 0.0);
547+
assertEquals(Double.NaN, baseQuery.property(simpleLong).avg(), 0.0);
548548
// Float.
549-
assertEquals(0, baseQuery.property(simpleFloat).avg(), 0.0001);
550-
assertEquals(0, baseQuery.property(simpleDouble).avg(), 0.0001);
549+
assertEquals(Double.NaN, baseQuery.property(simpleFloat).avg(), 0.0);
550+
assertEquals(Double.NaN, baseQuery.property(simpleDouble).avg(), 0.0);
551551
}
552552

553553
@Test

0 commit comments

Comments
 (0)