Skip to content

Commit ce819fe

Browse files
committed
edit online feature is the #1 enemy of TDD
1 parent 8c24b2e commit ce819fe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/scala/stdlib/HigherOrderFunctions.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,15 @@ object HigherOrderFunctions
155155
xs map sideEffect
156156

157157
makeUpper(List("abc", "xyz", "123")) should be(res0)
158-
158+
159159
makeWhatEverYouLike(List("ABC", "XYZ", "123"), { x
160160
x.toLowerCase
161161
}) should be(res1)
162162

163-
164163
//using it inline
165164
val myName = (name: String) => s"My name is $name"
166165
makeWhatEverYouLike(List("John", "Mark"), myName) should be(res2)
167-
166+
168167
List("Scala", "Erlang", "Clojure") map (_.length) should be(res3)
169168
}
170169

src/test/scala/stdlib/HigherOrderFunctionsSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ class HigherOrderFunctionsSpec extends Spec with Checkers {
8080
Test
8181
.testSuccess(
8282
HigherOrderFunctions.functionAsParameterHigherOrderFunctions _,
83-
List("ABC", "XYZ", "123") :: List("abc", "xyz", "123") :: List(5, 6, 7) :: HNil
83+
List("ABC", "XYZ", "123") :: List("abc", "xyz", "123") ::
84+
List("My name is John", "My name is Mark") :: List(5, 6, 7) :: HNil
8485
)
8586
)
8687
}

0 commit comments

Comments
 (0)