Skip to content

Commit

Permalink
codecov fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Jul 18, 2024
1 parent d1ed450 commit e14a8c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ public void testGetMaxAggregatedValueByteSize() {

public void testToLongValue() {
assertEquals(NumericUtils.doubleToSortableLong(3.0), aggregator.toLongValue(3.0), 0.0);
assertThrows(IllegalStateException.class, () -> aggregator.toLongValue(null));
}

public void testToStarTreeNumericTypeValue() {
assertEquals(NumericUtils.sortableLongToDouble(3L), aggregator.toStarTreeNumericTypeValue(3L, StarTreeNumericType.DOUBLE), 0.0);
assertThrows(IllegalStateException.class, () -> aggregator.toStarTreeNumericTypeValue(null, aggregator.getAggregatedValueType()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ public void testGetMaxAggregatedValueByteSize() {

public void testToLongValue() {
assertEquals(NumericUtils.doubleToSortableLong(3.0), aggregator.toLongValue(3.0), 0.0);
assertThrows(IllegalStateException.class, () -> aggregator.toLongValue(null));
}

public void testToStarTreeNumericTypeValue() {
assertEquals(NumericUtils.sortableLongToDouble(3L), aggregator.toStarTreeNumericTypeValue(3L, StarTreeNumericType.DOUBLE), 0.0);
assertThrows(IllegalStateException.class, () -> aggregator.toStarTreeNumericTypeValue(null, aggregator.getAggregatedValueType()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ public void testGetValueAggregatorForSumType() {
}

public void testGetAggregatedValueTypeForSumType() {
StarTreeNumericType starTreeNumericType = ValueAggregatorFactory.getAggregatedValueType(MetricStat.SUM);
assertEquals(SumValueAggregator.VALUE_AGGREGATOR_TYPE, starTreeNumericType);
assertEquals(SumValueAggregator.VALUE_AGGREGATOR_TYPE, ValueAggregatorFactory.getAggregatedValueType(MetricStat.SUM));
assertEquals(MaxValueAggregator.VALUE_AGGREGATOR_TYPE, ValueAggregatorFactory.getAggregatedValueType(MetricStat.MAX));
assertEquals(MinValueAggregator.VALUE_AGGREGATOR_TYPE, ValueAggregatorFactory.getAggregatedValueType(MetricStat.MIN));
assertEquals(CountValueAggregator.VALUE_AGGREGATOR_TYPE, ValueAggregatorFactory.getAggregatedValueType(MetricStat.COUNT));
}
}

0 comments on commit e14a8c9

Please sign in to comment.