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

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

There is a newer version: 3.3.0.0-alpha.1
Show newest version
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