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

org.scalatestplus.junit.AssertionsForJUnitMacro.scala Maven / Gradle / Ivy

package org.scalatestplus.junit

import org.scalactic.{Prettifier, source}
import org.scalatest.Assertions
import org.scalatest.AssertionsMacro.transform
import org.scalatest.compatible.Assertion

import scala.quoted.{Expr, Quotes}

object AssertionsForJUnitMacro {
  def assert(condition: Expr[Boolean], prettifier: Expr[Prettifier], pos: Expr[source.Position], clue: Expr[Any])(using Quotes): Expr[Assertion] =
    transform('{AssertionsForJUnit.assertionsHelper.macroAssert}, condition, prettifier, pos, clue)

  def assume(condition: Expr[Boolean], prettifier: Expr[Prettifier], pos: Expr[source.Position], clue: Expr[Any])(using Quotes): Expr[Assertion] =
    transform('{AssertionsForJUnit.assertionsHelper.macroAssume}, condition, prettifier, pos, clue)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy