Skip to content

Commit 226c84a

Browse files
committed
remove zero from monoids tests
1 parent a6a0d21 commit 226c84a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

core/src/test/java/fj/MonoidTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public void intersection_monoid_test() {
2525
Monoid<Set<Integer>> intersectionMonoid = Monoid.setIntersectionMonoid(integersBounded, Enumerator.intEnumerator, Ord.intOrd);
2626
Set<Integer> first = Set.set(Ord.intOrd, 1, 2, 3, 4);
2727
Set<Integer> second = Set.set(Ord.intOrd, 3, 4, 5, 6);
28-
Set<Integer> zero = intersectionMonoid.zero();
29-
Set<Integer> actual = intersectionMonoid.sum(intersectionMonoid.sum(zero, first), second);
28+
Set<Integer> actual = intersectionMonoid.sum(first, second);
3029
assertThat(actual, is(Set.set(Ord.intOrd, 3, 4)));
3130
}
3231

@@ -35,8 +34,7 @@ public void union_monoid_test() {
3534
Monoid<Set<Integer>> unionMonoid = Monoid.setMonoid(Ord.intOrd);
3635
Set<Integer> first = Set.set(Ord.intOrd, 1, 2, 3, 4);
3736
Set<Integer> second = Set.set(Ord.intOrd, 3, 4, 5, 6);
38-
Set<Integer> zero = unionMonoid.zero();
39-
Set<Integer> actual = unionMonoid.sum(unionMonoid.sum(zero, first), second);
37+
Set<Integer> actual = unionMonoid.sum(first, second);
4038
assertThat(actual, is(Set.set(Ord.intOrd, 1, 2, 3, 4, 5, 6)));
4139
}
4240

0 commit comments

Comments
 (0)