All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.specs2.matcher.StandardMatchResults.scala Maven / Gradle / Ivy

There is a newer version: 3.7
Show newest version
package org.specs2
package matcher

/**
 * This trait can be used in conjonction with Pattern matchers:
 *
 * List(1, 2) must be like { case List(a, b) => ok }
 * List(1, 2) must be like { case List(a, b) => ko("unexpected") }
 */
trait StandardMatchResults extends Expectations {
  def ok(m: String) = MatchSuccess(m, "ko", createExpectable(None))
  def ko(m: String) = MatchFailure("ok", m, createExpectable(None))

  lazy val ok = MatchSuccess("ok", "ko", createExpectable(None))
  lazy val ko = MatchFailure("ok", "ko", createExpectable(None))
}

object StandardMatchResults extends StandardMatchResults




© 2015 - 2024 Weber Informatics LLC | Privacy Policy