Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run spotless #1382

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static Object popStdDev(Object source, State state) {

Object variance = PopulationVarianceEvaluator.popVariance(source, state);
// The cases in which PopulationVariance returns null are the same as those where PopulationStdDev does.
if(variance == null) {
if (variance == null) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static Object stdDev(Object source, State state) {

Object variance = VarianceEvaluator.variance(source, state);
// The cases in which Variance returns null are the same as those where StdDev does.
if(variance == null) {
if (variance == null) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class Value {
* Set to (10<sup>28</sup> - 1) / 10<sup>8</sup>.
*/
public static final BigDecimal MAX_DECIMAL = new BigDecimal("99999999999999999999.99999999");

public static final Integer MIN_INT = Integer.MIN_VALUE;
public static final Long MIN_LONG = Long.MIN_VALUE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

import java.math.BigDecimal;
import java.util.Arrays;

import org.hamcrest.core.IsNull;
import org.junit.jupiter.api.Test;
import org.opencds.cqf.cql.engine.elm.executing.AnyTrueEvaluator;
import org.opencds.cqf.cql.engine.elm.executing.AvgEvaluator;
Expand Down Expand Up @@ -79,7 +77,6 @@ void all_aggregate_function_tests() {
value = results.forExpression("AnyTrueIsFalseWhenNull").value();
assertThat(value, is(false));


try {
value = AnyTrueEvaluator.anyTrue(Arrays.asList("this", "is", "error"));
fail();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,19 @@ void all_value_literals_and_selectors() {
// define QuantityMax: 99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityMax").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

// define QuantityPosMax: +99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityPosMax").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

// define QuantityMin: -99999999999999999999.99999999 'mg'
value = results.forExpression("QuantityMin").value();
assertThat(value, instanceOf(Quantity.class));
assertThat(
((Quantity) value).getValue(),
comparesEqualTo(new BigDecimal("-99999999999999999999.99999999")));
assertThat(((Quantity) value).getValue(), comparesEqualTo(new BigDecimal("-99999999999999999999.99999999")));
assertThat(((Quantity) value).getUnit(), is("mg"));

value = results.forExpression("DecimalZero").value();
Expand Down
Loading