@@ -188,13 +188,13 @@ defmodule EnumTest.List do
188188 assert Enum . split ( [ 1 , 2 , 3 ] , - 10 ) == { [ ] , [ 1 , 2 , 3 ] }
189189 end
190190
191- test :split_while do
192- assert Enum . split_while ( [ 1 , 2 , 3 ] , fn ( _ ) -> false end ) == { [ ] , [ 1 , 2 , 3 ] }
193- assert Enum . split_while ( [ 1 , 2 , 3 ] , fn ( _ ) -> true end ) == { [ 1 , 2 , 3 ] , [ ] }
194- assert Enum . split_while ( [ 1 , 2 , 3 ] , fn ( x ) -> x > 2 end ) == { [ ] , [ 1 , 2 , 3 ] }
195- assert Enum . split_while ( [ 1 , 2 , 3 ] , fn ( x ) -> x > 3 end ) == { [ ] , [ 1 , 2 , 3 ] }
196- assert Enum . split_while ( [ 1 , 2 , 3 ] , fn ( x ) -> x < 3 end ) == { [ 1 , 2 ] , [ 3 ] }
197- assert Enum . split_while ( [ ] , fn ( _ ) -> true end ) == { [ ] , [ ] }
191+ test :split_with do
192+ assert Enum . split_with ( [ 1 , 2 , 3 ] , fn ( _ ) -> false end ) == { [ ] , [ 1 , 2 , 3 ] }
193+ assert Enum . split_with ( [ 1 , 2 , 3 ] , fn ( _ ) -> true end ) == { [ 1 , 2 , 3 ] , [ ] }
194+ assert Enum . split_with ( [ 1 , 2 , 3 ] , fn ( x ) -> x > 2 end ) == { [ ] , [ 1 , 2 , 3 ] }
195+ assert Enum . split_with ( [ 1 , 2 , 3 ] , fn ( x ) -> x > 3 end ) == { [ ] , [ 1 , 2 , 3 ] }
196+ assert Enum . split_with ( [ 1 , 2 , 3 ] , fn ( x ) -> x < 3 end ) == { [ 1 , 2 ] , [ 3 ] }
197+ assert Enum . split_with ( [ ] , fn ( _ ) -> true end ) == { [ ] , [ ] }
198198 end
199199
200200 test :take do
@@ -499,16 +499,16 @@ defmodule EnumTest.Range do
499499 assert Enum . split ( range , 3 ) == { [ 1 , 0 ] , [ ] }
500500 end
501501
502- test :split_while do
502+ test :split_with do
503503 range = Range . new ( first: 1 , last: 3 )
504- assert Enum . split_while ( range , fn ( _ ) -> false end ) == { [ ] , [ 1 , 2 , 3 ] }
505- assert Enum . split_while ( range , fn ( _ ) -> true end ) == { [ 1 , 2 , 3 ] , [ ] }
506- assert Enum . split_while ( range , fn ( x ) -> x > 2 end ) == { [ ] , [ 1 , 2 , 3 ] }
507- assert Enum . split_while ( range , fn ( x ) -> x > 3 end ) == { [ ] , [ 1 , 2 , 3 ] }
508- assert Enum . split_while ( range , fn ( x ) -> x < 3 end ) == { [ 1 , 2 ] , [ 3 ] }
504+ assert Enum . split_with ( range , fn ( _ ) -> false end ) == { [ ] , [ 1 , 2 , 3 ] }
505+ assert Enum . split_with ( range , fn ( _ ) -> true end ) == { [ 1 , 2 , 3 ] , [ ] }
506+ assert Enum . split_with ( range , fn ( x ) -> x > 2 end ) == { [ ] , [ 1 , 2 , 3 ] }
507+ assert Enum . split_with ( range , fn ( x ) -> x > 3 end ) == { [ ] , [ 1 , 2 , 3 ] }
508+ assert Enum . split_with ( range , fn ( x ) -> x < 3 end ) == { [ 1 , 2 ] , [ 3 ] }
509509
510510 range = Range . new ( first: 1 , last: 0 )
511- assert Enum . split_while ( range , fn ( _ ) -> true end ) == { [ 1 , 0 ] , [ ] }
511+ assert Enum . split_with ( range , fn ( _ ) -> true end ) == { [ 1 , 0 ] , [ ] }
512512 end
513513
514514 test :take do
0 commit comments