@@ -52,7 +52,7 @@ object CheckEitherTest extends Properties("Either") {
52
52
def g (s : String ) = s.reverse
53
53
e.left.map(x => f(g(x))) == e.left.map(x => g(x)).left.map(f(_))})
54
54
55
- val prop_filter = forAll((e : Either [Int , Int ], x : Int ) => e.left.filter (_ % 2 == 0 ) ==
55
+ val prop_filterToOption = forAll((e : Either [Int , Int ], x : Int ) => e.left.filterToOption (_ % 2 == 0 ) ==
56
56
(if (e.isRight || e.left.get % 2 != 0 ) None else Some (e)))
57
57
58
58
val prop_seq = forAll((e : Either [Int , Int ]) => e.left.toSeq == (e match {
@@ -98,7 +98,7 @@ object CheckEitherTest extends Properties("Either") {
98
98
def g (s : String ) = s.reverse
99
99
e.right.map(x => f(g(x))) == e.right.map(x => g(x)).right.map(f(_))})
100
100
101
- val prop_filter = forAll((e : Either [Int , Int ], x : Int ) => e.right.filter (_ % 2 == 0 ) ==
101
+ val prop_filterToOption = forAll((e : Either [Int , Int ], x : Int ) => e.right.filterToOption (_ % 2 == 0 ) ==
102
102
(if (e.isLeft || e.right.get % 2 != 0 ) None else Some (e)))
103
103
104
104
val prop_seq = forAll((e : Either [Int , Int ]) => e.right.toSeq == (e match {
@@ -202,7 +202,7 @@ object CheckEitherTest extends Properties("Either") {
202
202
(" Left.prop_flatMapComposition" , CheckLeftProjection .prop_flatMapComposition),
203
203
(" Left.prop_mapIdentity" , CheckLeftProjection .prop_mapIdentity),
204
204
(" Left.prop_mapComposition" , CheckLeftProjection .prop_mapComposition),
205
- (" Left.prop_filter " , CheckLeftProjection .prop_filter ),
205
+ (" Left.prop_filterToOption " , CheckLeftProjection .prop_filterToOption ),
206
206
(" Left.prop_seq" , CheckLeftProjection .prop_seq),
207
207
(" Left.prop_option" , CheckLeftProjection .prop_option),
208
208
(" Right.prop_value" , CheckRightProjection .prop_value),
@@ -214,7 +214,7 @@ object CheckEitherTest extends Properties("Either") {
214
214
(" Right.prop_flatMapComposition" , CheckRightProjection .prop_flatMapComposition),
215
215
(" Right.prop_mapIdentity" , CheckRightProjection .prop_mapIdentity),
216
216
(" Right.prop_mapComposition" , CheckRightProjection .prop_mapComposition),
217
- (" Right.prop_filter " , CheckRightProjection .prop_filter ),
217
+ (" Right.prop_filterToOption " , CheckRightProjection .prop_filterToOption ),
218
218
(" Right.prop_seq" , CheckRightProjection .prop_seq),
219
219
(" Right.prop_option" , CheckRightProjection .prop_option),
220
220
(" prop_Either_left" , prop_Either_left),
0 commit comments