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

munit.internal.difflib.ComparisonFailExceptionHandler.scala Maven / Gradle / Ivy

There is a newer version: 1.0.0-M10
Show newest version
package munit.internal.difflib

import munit.Location
import munit.Assertions
import munit.Clues

trait ComparisonFailExceptionHandler {
  def handle(
      message: String,
      obtained: String,
      expected: String,
      location: Location
  ): Nothing
}
object ComparisonFailExceptionHandler {
  def fromAssertions(
      assertions: Assertions,
      clues: => Clues
  ): ComparisonFailExceptionHandler =
    new ComparisonFailExceptionHandler {
      def handle(
          message: String,
          obtained: String,
          expected: String,
          loc: Location
      ): Nothing = {
        assertions.failComparison(message, obtained, expected, clues)(loc)
      }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy