2020-04-01から1ヶ月間の記事一覧

PartialFunction

specs2のAnyMatchers#beLikeを使ってみようと思ったらPartialFunctionなるものがでてきたので調べた /** matches if the value returns a successful result when applied to a PartialFunction */ def beLike[T](pattern: PartialFunction[T, MatchResult[_…

beLike

/** matches if the value returns a successful result when applied to a PartialFunction */ def beLike[T](pattern: PartialFunction[T, MatchResult[_]]) = new Matcher[T] { def apply[S