Skip to content

Commit

Permalink
ResultTest.swap hotfix (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: David Greven <fixed-term.David.Greven@de.bosch.com>
Signed-off-by: Sebastian Becker <Sebastian.Becker@de.bosch.com>
  • Loading branch information
grevend-bosch committed Nov 15, 2021
1 parent 0c17224 commit 5a3dd17
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ void result() {
void swap() {
var value = 12;
var res = new Success<Integer, Integer>(value);
assertThat(res.<Integer>fold(r -> -1, identity())).isEqualTo(value);
assertThat(res.swap().<Integer>fold(r -> -1, identity())).isEqualTo(-1);
assertThat(res.swap().swap().<Integer>fold(r -> -1, identity())).isEqualTo(value);
assertThat(res.<Integer>fold(identity(), r -> -1)).isEqualTo(value);
assertThat(res.swap().<Integer>fold(identity(), r -> -1)).isEqualTo(-1);
assertThat(res.swap().swap().<Integer>fold(identity(), r -> -1)).isEqualTo(value);
}
}

0 comments on commit 5a3dd17

Please sign in to comment.