Skip to content

Commit

Permalink
#385 Adds prefab values for (Double|Int|Long)SummaryStatistics
Browse files Browse the repository at this point in the history
  • Loading branch information
jqno committed Feb 3, 2021
1 parent 1154914 commit 6e38095
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<a name="3.x"/>

## [Unreleased]
- Added prefab values for `java.util.DoubleSummaryStatistics`, `java.util.IntSummaryStatistics` and `java.util.LongSummaryStatistics` ([Issue 385](https://github.com/jqno/equalsverifier/issues/385))

## [3.5.2] - 2021-01-19
## Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,16 @@ private void addCommonClasses() {
Currency.getInstance("EUR"),
Currency.getInstance("JPY")
);

DoubleSummaryStatistics redDoubleStats = new DoubleSummaryStatistics();
DoubleSummaryStatistics blueDoubleStats = new DoubleSummaryStatistics();
addValues(DoubleSummaryStatistics.class, redDoubleStats, blueDoubleStats, redDoubleStats);
IntSummaryStatistics redIntStats = new IntSummaryStatistics();
IntSummaryStatistics blueIntStats = new IntSummaryStatistics();
addValues(IntSummaryStatistics.class, redIntStats, blueIntStats, redIntStats);
LongSummaryStatistics redLongStats = new LongSummaryStatistics();
LongSummaryStatistics blueLongStats = new LongSummaryStatistics();
addValues(LongSummaryStatistics.class, redLongStats, blueLongStats, redLongStats);
}

private void addDateTimeClasses() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,9 @@ static final class Java8ApiClassesContainer {
private final Period period;
private final Year year;
private final YearMonth yearMonth;
private final DoubleSummaryStatistics doubleSummaryStatistics;
private final IntSummaryStatistics intSummaryStatistics;
private final LongSummaryStatistics longSummaryStatistics;

public Java8ApiClassesContainer(
Optional<?> optional,
Expand All @@ -555,7 +558,10 @@ public Java8ApiClassesContainer(
OffsetTime offsetTime,
Period period,
Year year,
YearMonth yearMonth
YearMonth yearMonth,
DoubleSummaryStatistics doubleSummaryStatistics,
IntSummaryStatistics intSummaryStatistics,
LongSummaryStatistics longSummaryStatistics
) {
this.optional = optional;
this.optionalDouble = optionalDouble;
Expand All @@ -580,6 +586,9 @@ public Java8ApiClassesContainer(
this.period = period;
this.year = year;
this.yearMonth = yearMonth;
this.doubleSummaryStatistics = doubleSummaryStatistics;
this.intSummaryStatistics = intSummaryStatistics;
this.longSummaryStatistics = longSummaryStatistics;
}

@Override
Expand Down

0 comments on commit 6e38095

Please sign in to comment.