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

org.scalatest.matchers.dsl.MatcherFactory5.scala Maven / Gradle / Ivy


package org.scalatest.matchers.dsl

import org.scalatest.enablers._
import org.scalatest.matchers.MatchersHelper.andMatchersAndApply
import org.scalatest.matchers.MatchersHelper.orMatchersAndApply
import org.scalatest.matchers.dsl.MatcherWords
import scala.collection.GenTraversable
import scala.util.matching.Regex
import org.scalactic._
import TripleEqualsSupport.Spread
import TripleEqualsSupport.TripleEqualsInvocation
import org.scalatest.FailureMessages
import org.scalatest.Resources
import org.scalatest.matchers.Matcher
import org.scalatest.matchers.MatchResult
import org.scalatest.matchers.BeMatcher
import org.scalatest.matchers.BePropertyMatcher
import org.scalatest.matchers.HavePropertyMatcher
import org.scalatest.matchers.AMatcher
import org.scalatest.matchers.AnMatcher
import org.scalatest.matchers.MatchPatternMacro
import org.scalatest.matchers.TypeMatcherMacro
import org.scalatest.matchers.MatchPatternHelper
import org.scalatest.matchers.dsl.FullyMatchWord
import org.scalatest.matchers.dsl.StartWithWord
import org.scalatest.matchers.dsl.EndWithWord
import org.scalatest.matchers.dsl.IncludeWord
import org.scalatest.matchers.dsl.HaveWord
import org.scalatest.matchers.dsl.BeWord
import org.scalatest.matchers.dsl.NotWord
import org.scalatest.matchers.dsl.ContainWord
import org.scalatest.matchers.dsl.ResultOfLengthWordApplication
import org.scalatest.matchers.dsl.ResultOfSizeWordApplication
import org.scalatest.matchers.dsl.ResultOfMessageWordApplication
import org.scalatest.matchers.dsl.ResultOfLessThanComparison
import org.scalatest.matchers.dsl.ResultOfGreaterThanComparison
import org.scalatest.matchers.dsl.ResultOfLessThanOrEqualToComparison
import org.scalatest.matchers.dsl.ResultOfGreaterThanOrEqualToComparison
import org.scalatest.matchers.dsl.ResultOfAWordToSymbolApplication
import org.scalatest.matchers.dsl.ResultOfAWordToBePropertyMatcherApplication
import org.scalatest.matchers.dsl.ResultOfAWordToAMatcherApplication
import org.scalatest.matchers.dsl.ResultOfAnWordToSymbolApplication
import org.scalatest.matchers.dsl.ResultOfAnWordToBePropertyMatcherApplication
import org.scalatest.matchers.dsl.ResultOfAnWordToAnMatcherApplication
import org.scalatest.matchers.dsl.ResultOfTheSameInstanceAsApplication
import org.scalatest.matchers.dsl.ResultOfRegexWordApplication
import org.scalatest.matchers.dsl.ResultOfKeyWordApplication
import org.scalatest.matchers.dsl.ResultOfValueWordApplication
import org.scalatest.matchers.dsl.RegexWithGroups
import org.scalatest.matchers.dsl.ResultOfDefinedAt
import org.scalatest.matchers.dsl.ResultOfOneOfApplication
import org.scalatest.matchers.dsl.ResultOfOneElementOfApplication
import org.scalatest.matchers.dsl.ResultOfAtLeastOneOfApplication
import org.scalatest.matchers.dsl.ResultOfAtLeastOneElementOfApplication
import org.scalatest.matchers.dsl.ResultOfNoneOfApplication
import org.scalatest.matchers.dsl.ResultOfNoElementsOfApplication
import org.scalatest.matchers.dsl.ResultOfTheSameElementsAsApplication
import org.scalatest.matchers.dsl.ResultOfTheSameElementsInOrderAsApplication
import org.scalatest.matchers.dsl.ResultOfOnlyApplication
import org.scalatest.matchers.dsl.ResultOfAllOfApplication
import org.scalatest.matchers.dsl.ResultOfAllElementsOfApplication
import org.scalatest.matchers.dsl.ResultOfInOrderOnlyApplication
import org.scalatest.matchers.dsl.ResultOfInOrderApplication
import org.scalatest.matchers.dsl.ResultOfInOrderElementsOfApplication
import org.scalatest.matchers.dsl.ResultOfAtMostOneOfApplication
import org.scalatest.matchers.dsl.ResultOfAtMostOneElementOfApplication
import org.scalatest.matchers.dsl.SortedWord
import org.scalatest.matchers.dsl.ResultOfATypeInvocation
import org.scalatest.matchers.dsl.ResultOfAnTypeInvocation
import org.scalatest.matchers.dsl.ExistWord
import org.scalatest.matchers.dsl.ResultOfNotExist
import org.scalatest.matchers.dsl.ReadableWord
import org.scalatest.matchers.dsl.WritableWord
import org.scalatest.matchers.dsl.EmptyWord
import org.scalatest.matchers.dsl.DefinedWord

import scala.language.higherKinds

/**
 * A matcher factory that can produce a matcher given five typeclass instances.
 *
 * 

* In the type parameters for this class, "SC" means superclass; "TC" * (in TC1, TC2, etc.) means typeclass. * This class's matcher factory method will produce a Matcher[T], where T is a subtype of (or the same type * as) SC, given a typeclass instance for each TCn * implicit parameter (for example, a TC1[T], TC2[T], etc.). *

* * @author Bill Venners */ // Add a TYPECLASSN for each N abstract class MatcherFactory5[-SC, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]] { thisMatcherFactory => /** * Factory method that will produce a Matcher[T], where T is a subtype of (or the same type * as) SC, given a typeclass instance for each TCn * implicit parameter (for example, a TC1[T], TC2[T], etc.). */ def matcher[T <: SC : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[T] /** * Ands this matcher factory with the passed matcher. */ def and[U <: SC](rightMatcher: Matcher[U]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] = new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcher) + ")" } } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcher) + ")" } /** * Ors this matcher factory with the passed matcher. */ def or[U <: SC](rightMatcher: Matcher[U]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] = new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcher) + ")" } } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcher) + ")" } /** * Ands this matcher factory with the passed MatcherFactory1 that has the same final typeclass as this one. */ def and[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC5]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] = new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcherFactory) + ")" } } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") and (" + Prettifier.default(rightMatcherFactory) + ")" } /** * Ors this matcher factory with the passed MatcherFactory1 that has the same final typeclass as this one. */ def or[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC5]): MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] = new MatcherFactory5[U, TC1, TC2, TC3, TC4, TC5] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcherFactory) + ")" } } override def toString: String = "(" + Prettifier.default(thisMatcherFactory) + ") or (" + Prettifier.default(rightMatcherFactory) + ")" } /** * Ands this matcher factory with the passed matcher factory. */ def and[U <: SC, TC6[_]](rightMatcherFactory: MatcherFactory1[U, TC6]): MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] = new MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ors this matcher factory with the passed matcher factory. */ def or[U <: SC, TC6[_]](rightMatcherFactory: MatcherFactory1[U, TC6]): MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] = new MatcherFactory6[U, TC1, TC2, TC3, TC4, TC5, TC6] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ands this matcher factory with the passed matcher factory. */ def and[U <: SC, TC6[_], TC7[_]](rightMatcherFactory: MatcherFactory2[U, TC6, TC7]): MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] = new MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ors this matcher factory with the passed matcher factory. */ def or[U <: SC, TC6[_], TC7[_]](rightMatcherFactory: MatcherFactory2[U, TC6, TC7]): MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] = new MatcherFactory7[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ands this matcher factory with the passed matcher factory. */ def and[U <: SC, TC6[_], TC7[_], TC8[_]](rightMatcherFactory: MatcherFactory3[U, TC6, TC7, TC8]): MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] = new MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ors this matcher factory with the passed matcher factory. */ def or[U <: SC, TC6[_], TC7[_], TC8[_]](rightMatcherFactory: MatcherFactory3[U, TC6, TC7, TC8]): MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] = new MatcherFactory8[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ands this matcher factory with the passed matcher factory. */ def and[U <: SC, TC6[_], TC7[_], TC8[_], TC9[_]](rightMatcherFactory: MatcherFactory4[U, TC6, TC7, TC8, TC9]): MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] = new MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8 : TC9]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher andMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * Ors this matcher factory with the passed matcher factory. */ def or[U <: SC, TC6[_], TC7[_], TC8[_], TC9[_]](rightMatcherFactory: MatcherFactory4[U, TC6, TC7, TC8, TC9]): MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] = new MatcherFactory9[U, TC1, TC2, TC3, TC4, TC5, TC6, TC7, TC8, TC9] { def matcher[V <: U : TC1 : TC2 : TC3 : TC4 : TC5 : TC6 : TC7 : TC8 : TC9]: Matcher[V] = { new Matcher[V] { def apply(left: V): MatchResult = { val leftMatcher = thisMatcherFactory.matcher val rightMatcher = rightMatcherFactory.matcher orMatchersAndApply(left, leftMatcher, rightMatcher) } } } } /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndHaveWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and have length (3 - 1)
     *                          ^
     * 
*/ def length(expectedLength: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = and(MatcherWords.have.length(expectedLength)) // These guys need to generate a MatcherFactory of N+1. And it needs N-1 TC's, with the last one being Length. /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and have size (3 - 1)
     *                          ^
     * 
*/ def size(expectedSize: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = and(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and have message ("A message from Mars!")
     *                          ^
     * 
*/ def message(expectedMessage: String): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = and(MatcherWords.have.message(expectedMessage)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and have size (3 - 1)
   *                     ^
   * 
*/ def and(haveWord: HaveWord): AndHaveWord = new AndHaveWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndContainWord(prettifier: Prettifier, pos: source.Position) { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain (3 - 1)
     *                             ^
     * 
*/ def apply(expectedElement: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain(expectedElement)) // And some, the ones that would by themselves already generate a Matcher, just return a MatcherFactoryN where N is the same. /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain key ("one")
     *                             ^
     * 
*/ def key(expectedKey: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.and(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain value (1)
     *                             ^
     * 
*/ def value(expectedValue: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.and(MatcherWords.contain.value(expectedValue)) // And some, the ones that would by themselves already generate a Matcher, just return a MatcherFactoryN where N is the same. /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain theSameElementsAs List(1, 2, 3)
     *                             ^
     * 
*/ def theSameElementsAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.theSameElementsAs(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain theSameElementsInOrderAs List(1, 2, 3)
     *                             ^
     * 
*/ def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.theSameElementsInOrderAs(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain inOrderOnly (1, 2, 3)
     *                             ^
     * 
*/ def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain allOf (1, 2, 3)
     *                             ^
     * 
*/ def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles .toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain allElementsOf List(1, 2, 3)
     *                             ^
     * 
*/ def allElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.allElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain inOrder (1, 2, 3)
     *                             ^
     * 
*/ def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain inOrderElementsOf List(1, 2, 3)
     *                             ^
     * 
*/ def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrderElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain oneOf (1, 2, 3)
     *                             ^
     * 
*/ def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain oneElementOf (1, 2, 3)
     *                             ^
     * 
*/ def oneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain.oneElementOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain atLeastOneOf (1, 2, 3)
     *                             ^
     * 
*/ def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain atLeastOneElementOf (1, 2, 3)
     *                             ^
     * 
*/ def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atLeastOneElementOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain only (1, 2, 3)
     *                             ^
     * 
*/ def only(right: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain noneOf (1, 2, 3)
     *                             ^
     * 
*/ def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain noElementsOf (1, 2, 3)
     *                             ^
     * 
*/ def noElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.contain.noElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain atMostOneOf (1, 2, 3)
     *                             ^
     * 
*/ def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and contain atMostOneOf (1, 2, 3)
     *                             ^
     * 
*/ def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atMostOneElementOf(elements)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and contain key ("one")
   *                 ^
   * 
*/ def and(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): AndContainWord = new AndContainWord(prettifier, pos) /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndBeWord { () () /** * This method enables the following syntax given a MatcherFactory5, where file is a BePropertyMatcher: * *
     * aMatcherFactory and be a (file)
     *                        ^
     * 
*/ def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory5, where validNumber is an AMatcher: * *
     * aMatcherFactory and be a (validNumber)
     *                        ^
     * 
*/ def a[U](aMatcher: AMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.a(aMatcher)) () () /** * This method enables the following syntax given a MatcherFactory5, where apple is a BePropertyMatcher: * *
     * aMatcherFactory and be an (apple)
     *                        ^
     * 
*/ def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory5, where integerNumber is an AnMatcher: * *
     * aMatcherFactory and be an (integerNumber)
     *                        ^
     * 
*/ def an[U](anMatcher: AnMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and be theSameInstanceAs (string)
     *                        ^
     * 
*/ def theSameInstanceAs(anyRef: AnyRef): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: * *
     * aMatcherFactory and be definedAt (8)
     *                        ^
     * 
*/ def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.be.definedAt(right)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and be a ('file)
   *                 ^
   * 
*/ def and(beWord: BeWord): AndBeWord = new AndBeWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndFullyMatchWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and fullyMatch regex (decimal)
     *                                ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and fullyMatch regex (("a(b*)c" withGroup "bb"))
     *                                ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and fullyMatch regex (decimalRegex)
     *                                ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.fullyMatch.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and fullyMatch regex (decimalRegex)
   *                 ^
   * 
*/ def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord = new AndFullyMatchWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndIncludeWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and include regex (decimal)
     *                             ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and include regex ("a(b*)c" withGroup "bb")
     *                             ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and include regex (decimalRegex)
     *                             ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.include.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and include regex ("wor.d")
   *                 ^
   * 
*/ def and(includeWord: IncludeWord): AndIncludeWord = new AndIncludeWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndStartWithWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and startWith regex (decimal)
     *                               ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and startWith regex ("a(b*)c" withGroup "bb")
     *                               ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and startWith regex (decimalRegex)
     *                               ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.startWith.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and startWith regex ("1.7")
   *                 ^
   * 
*/ def and(startWithWord: StartWithWord): AndStartWithWord = new AndStartWithWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndEndWithWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and endWith regex (decimal)
     *                             ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and endWith regex ("a(b*)c" withGroup "bb")
     *                             ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and endWith regex (decimalRegex)
     *                             ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = and(MatcherWords.endWith.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and endWith regex (decimalRegex)
   *                 ^
   * 
*/ def and(endWithWord: EndWithWord): AndEndWithWord = new AndEndWithWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class AndNotWord(prettifier: Prettifier, pos: source.Position) { /** * Get the MatcherFactory instance, currently used by macro only. */ val owner = thisMatcherFactory /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not equal (3 - 1)
     *                         ^
     * 
*/ def equal(any: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Equality] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.equal(any))) /** * This method enables the following syntax, for the "primitive" numeric types: * *
     * aMatcherFactory and not equal (17.0 +- 0.2)
     *                         ^
     * 
*/ def equal[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.equal(spread)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not equal (null)
     *                         ^
     * 
*/ def equal(o: Null): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = { thisMatcherFactory and { new Matcher[SC] { def apply(left: SC): MatchResult = { MatchResult( left != null, Resources.rawEqualedNull, Resources.rawDidNotEqualNull, Resources.rawMidSentenceEqualedNull, Resources.rawDidNotEqualNull, Vector.empty, Vector(left) ) } override def toString: String = "not equal null" } } } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be (3 - 1)
     *                         ^
     * 
*/ def be(any: Any): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.be(any))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not have length (3)
     *                         ^
     * 
*/ def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not have size (3)
     *                         ^
     * 
*/ def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not have message ("Message from Mars!")
     *                         ^
     * 
*/ def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not have (author ("Melville"))
     *                         ^
     * 
*/ def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be < (6)
     *                         ^
     * 
*/ def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be (null)
     *                         ^
     * 
*/ def be(o: Null): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(o)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory (8) and not be > (6)
     *                             ^
     * 
*/ def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be <= (2)
     *                         ^
     * 
*/ def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be >= (6)
     *                         ^
     * 
*/ def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** * * The deprecation period for the should be === syntax has expired, and the syntax may no longer be * used. Please use should equal, should ===, shouldEqual, * should be, or shouldBe instead. * * *

* Note: usually syntax will be removed after its deprecation period. This was left in because otherwise the syntax could in some * cases still compile, but silently wouldn't work. *

*/ def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(tripleEqualsInvocation)(pos)) () () /** * This method enables the following syntax given a MatcherFactory5, where odd is a BeMatcher: * *
     * aMatcherFactory and not be (odd)
     *                         ^
     * 
*/ def be[U](beMatcher: BeMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax given a MatcherFactory5, where directory is a BePropertyMatcher: * *
     * aMatcherFactory and not be (directory)
     *                         ^
     * 
*/ def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(bePropertyMatcher)) () () /** * This method enables the following syntax given a MatcherFactory5, where validMarks is an AMatcher: * *
     * aMatcherFactory and not be a (validMarks)
     *                         ^
     * 
*/ def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax given a MatcherFactory5, where directory is a BePropertyMatcher: * *
     * aMatcherFactory and not be a (directory)
     *                         ^
     * 
*/ def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) () () /** * This method enables the following syntax given a MatcherFactory5, where apple is a BePropertyMatcher: * *
     * aMatcherFactory and not be an (apple)
     *                         ^
     * 
*/ def be[SC <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[SC]) = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory5, where invalidMarks is a AnMatcher: * *
     * aMatcherFactory and not be an (invalidMarks)
     *                         ^
     * 
*/ def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be a [Book]
     *                         ^
     * 
*/ inline def be(aType: ResultOfATypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = ${ MatcherFactory5.andNotATypeMatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]('{this}, '{aType}) } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be an [Apple]
     *                         ^
     * 
*/ inline def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = ${ MatcherFactory5.andNotAnTypeMatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]('{this}, '{anType}) } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not be theSameInstanceAs (otherString)
     *                         ^
     * 
*/ def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax, for the "primitive" numeric types: * *
     * aMatcherFactory and not be (17.0 +- 0.2)
     *                         ^
     * 
*/ def be[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(spread)) /** * This method enables the following syntax, where fraction is a PartialFunction: * *
     * aMatcherFactory and not be definedAt (8)
     *                         ^
     * 
*/ def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.be(resultOfDefinedAt)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not be sorted
     *                         ^
     * 
*/ def be(sortedWord: SortedWord) = thisMatcherFactory.and(MatcherWords.not.be(sortedWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not be readable
     *                         ^
     * 
*/ def be(readableWord: ReadableWord) = thisMatcherFactory.and(MatcherWords.not.be(readableWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not be writable
     *                         ^
     * 
*/ def be(writableWord: WritableWord) = thisMatcherFactory.and(MatcherWords.not.be(writableWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not be empty
     *                         ^
     * 
*/ def be(emptyWord: EmptyWord) = thisMatcherFactory.and(MatcherWords.not.be(emptyWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not be defined
     *                         ^
     * 
*/ def be(definedWord: DefinedWord) = thisMatcherFactory.and(MatcherWords.not.be(definedWord)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not fullyMatch regex (decimal)
     *                         ^
     * 
*/ def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not include regex (decimal)
     *                         ^
     * 
*/ def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.include(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not include ("1.7")
     *                         ^
     * 
*/ def include(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.include(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not startWith regex (decimal)
     *                         ^
     * 
*/ def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not startWith ("1.7")
     *                         ^
     * 
*/ def startWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.startWith(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not endWith regex (decimal)
     *                         ^
     * 
*/ def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not endWith ("1.7")
     *                         ^
     * 
*/ def endWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.and(MatcherWords.not.endWith(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain (3)
     *                         ^
     * 
*/ def contain[U](expectedElement: U): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(expectedElement)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain key ("three")
     *                         ^
     * 
*/ def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.and(MatcherWords.not.contain(resultOfKeyWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain value (3)
     *                         ^
     * 
*/ def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.and(MatcherWords.not.contain(resultOfValueWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain oneOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain oneElementOf (List(8, 1, 2))
     *                         ^
     * 
*/ def contain(right: ResultOfOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain atLeastOneOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain atLeastOneOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain noneOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfNoneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain noElementsOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfNoElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain theSameElementsAs (List(8, 1, 2))
     *                         ^
     * 
*/ def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain theSameElementsInOrderAs (List(8, 1, 2))
     *                         ^
     * 
*/ def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain only (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain inOrderOnly (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain allOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfAllOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain allElementsOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfAllElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain inOrder (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfInOrderApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain inOrder (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain atMostOneOf (8, 1, 2)
     *                         ^
     * 
*/ def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory and not contain atMostOneElementOf (List(8, 1, 2))
     *                         ^
     * 
*/ def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** * This method enables the following syntax: * *
     * aMatcherFactory and not matchPattern { case Person("Bob", _) =>}
     *                         ^
     * 
*/ inline def matchPattern(right: PartialFunction[Any, _]) = ${ MatcherFactory5.andNotMatchPattern('{this}, '{right}) } } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory and not contain value (3)
   *                 ^
   * 
*/ def and(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): AndNotWord = new AndNotWord(prettifier, pos) /** * This method enables the following syntax: * *
   * aMatcherFactory and exist
   *                 ^
   * 
*/ def and(existWord: ExistWord): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] = thisMatcherFactory.and(MatcherWords.exist.matcherFactory) /** * This method enables the following syntax: * *
   * aMatcherFactory and not (exist)
   *                 ^
   * 
*/ def and(notExist: ResultOfNotExist): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] = thisMatcherFactory.and(MatcherWords.not.exist) /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrHaveWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or have length (3 - 1)
     *                         ^
     * 
*/ def length(expectedLength: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = or(MatcherWords.have.length(expectedLength)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or have size (3 - 1)
     *                         ^
     * 
*/ def size(expectedSize: Long): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = or(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or have message ("Message from Mars!")
     *                         ^
     * 
*/ def message(expectedMessage: String): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = or(MatcherWords.have.message(expectedMessage)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or have size (3 - 1)
   *                 ^
   * 
*/ def or(haveWord: HaveWord): OrHaveWord = new OrHaveWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrContainWord(prettifier: Prettifier, pos: source.Position) { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain (3 - 1)
     *                            ^
     * 
*/ def apply(expectedElement: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain(expectedElement)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain key ("one")
     *                            ^
     * 
*/ def key(expectedKey: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.or(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain value (1)
     *                            ^
     * 
*/ def value(expectedValue: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.or(MatcherWords.contain.value(expectedValue)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain theSameElementsAs List(1, 2, 3)
     *                            ^
     * 
*/ def theSameElementsAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.theSameElementsAs(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain theSameElementsInOrderAs List(1, 2, 3)
     *                            ^
     * 
*/ def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.theSameElementsInOrderAs(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain inOrderOnly (1, 2, 3)
     *                            ^
     * 
*/ def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain allOf (1, 2, 3)
     *                            ^
     * 
*/ def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain allElementsOf (1, 2, 3)
     *                            ^
     * 
*/ def allElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.allElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain inOrder (1, 2, 3)
     *                            ^
     * 
*/ def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain inOrderElementsOf List(1, 2, 3)
     *                            ^
     * 
*/ def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrderElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain oneOf (1, 2, 3)
     *                            ^
     * 
*/ def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain oneElementOf (1, 2, 3)
     *                            ^
     * 
*/ def oneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain.oneElementOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain atLeastOneOf (1, 2, 3)
     *                            ^
     * 
*/ def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain atLeastOneOf (1, 2, 3)
     *                            ^
     * 
*/ def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atLeastOneElementOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain only (1, 2, 3)
     *                            ^
     * 
*/ def only(right: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain noneOf (1, 2, 3)
     *                            ^
     * 
*/ def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain noElementsOf (1, 2, 3)
     *                            ^
     * 
*/ def noElementsOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.contain.noElementsOf(elements)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain atMostOneOf (1, 2, 3)
     *                            ^
     * 
*/ def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or contain atMostOneOf (1, 2, 3)
     *                            ^
     * 
*/ def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atMostOneElementOf(elements)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * (aMatcherFactory or contain value (1))
   *                  ^
   * 
*/ def or(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): OrContainWord = new OrContainWord(prettifier, pos) /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrBeWord { () () /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or be a (directory)
     *                       ^
     * 
*/ def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or be a (validNumber)
     *                       ^
     * 
*/ def a[U](aMatcher: AMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.a(aMatcher)) () () /** * This method enables the following syntax given a MatcherFactory5, where apple is a BePropertyMatcher: * *
     * aMatcherFactory or be an (apple)
     *                       ^
     * 
*/ def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory5, where integerNumber is a AnMatcher: * *
     * aMatcherFactory or be an (integerNumber)
     *                       ^
     * 
*/ def an[U](anMatcher: AnMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or be theSameInstanceAs (otherString)
     *                       ^
     * 
*/ def theSameInstanceAs(anyRef: AnyRef): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: * *
     * aMatcherFactory or be definedAt (8)
     *                       ^
     * 
*/ def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.be.definedAt(right)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or be a ('directory)
   *                 ^
   * 
*/ def or(beWord: BeWord): OrBeWord = new OrBeWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrFullyMatchWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or fullyMatch regex (decimal)
     *                               ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or fullyMatch regex ("a(b*)c" withGroup "bb")
     *                               ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or fullyMatch regex (decimal)
     *                               ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.fullyMatch.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or fullyMatch regex (decimal)
   *                 ^
   * 
*/ def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord = new OrFullyMatchWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrIncludeWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or include regex (decimal)
     *                            ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or include regex ("a(b*)c" withGroup "bb")
     *                            ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or include regex (decimal)
     *                            ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.include.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or include regex ("1.7")
   *                 ^
   * 
*/ def or(includeWord: IncludeWord): OrIncludeWord = new OrIncludeWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrStartWithWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or startWith regex (decimal)
     *                              ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or startWith regex ("a(b*)c" withGroup "bb")
     *                              ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or startWith regex (decimal)
     *                              ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.startWith.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or startWith regex ("1.7")
   *                 ^
   * 
*/ def or(startWithWord: StartWithWord): OrStartWithWord = new OrStartWithWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrEndWithWord { /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or endWith regex (decimal)
     *                            ^
     * 
*/ def regex(regexString: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or endWith regex ("d(e*)f" withGroup "ee")
     *                            ^
     * 
*/ def regex(regexWithGroups: RegexWithGroups): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or endWith regex (decimal)
     *                            ^
     * 
*/ def regex(regex: Regex): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = or(MatcherWords.endWith.regex(regex)) } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or endWith regex ("7b")
   *                 ^
   * 
*/ def or(endWithWord: EndWithWord): OrEndWithWord = new OrEndWithWord /** * This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of * the matchers DSL. * * @author Bill Venners */ final class OrNotWord(prettifier: Prettifier, pos: source.Position) { /** * Get the MatcherFactory instance, currently used by macro. */ val owner = thisMatcherFactory /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not equal (3 - 1)
     *                        ^
     * 
*/ def equal(any: Any): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Equality] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.equal(any))) /** * This method enables the following syntax for the "primitive" numeric types: * *
     * aMatcherFactory or not equal (17.0 +- 0.2)
     *                        ^
     * 
*/ def equal[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.equal(spread)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not equal (null)
     *                        ^
     * 
*/ def equal(o: Null): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = { thisMatcherFactory or { new Matcher[SC] { def apply(left: SC): MatchResult = { MatchResult( left != null, Resources.rawEqualedNull, Resources.rawDidNotEqualNull, Resources.rawMidSentenceEqualedNull, Resources.rawDidNotEqualNull, Vector.empty, Vector(left) ) } override def toString: String = "not equal null" } } } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be (2)
     *                        ^
     * 
*/ def be(any: Any): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.be(any))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not have length (3)
     *                        ^
     * 
*/ def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Length] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not have size (3)
     *                        ^
     * 
*/ def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Size] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not have message ("Message from Mars!")
     *                        ^
     * 
*/ def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Messaging] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not have (author ("Melville"))
     *                        ^
     * 
*/ def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be (null)
     *                        ^
     * 
*/ def be(o: Null): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(o)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be < (8)
     *                        ^
     * 
*/ def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be > (6)
     *                        ^
     * 
*/ def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be <= (2)
     *                        ^
     * 
*/ def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be >= (6)
     *                        ^
     * 
*/ def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** * * The deprecation period for the "be ===" syntax has expired, and the syntax * will now throw NotAllowedException. Please use should equal, should ===, shouldEqual, * should be, or shouldBe instead. * * *

* Note: usually syntax will be removed after its deprecation period. This was left in because otherwise the syntax could in some * cases still compile, but silently wouldn't work. *

*/ def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(tripleEqualsInvocation)(pos)) () () /** * This method enables the following syntax given a MatcherFactory5, where odd is a BeMatcher: * *
     * aMatcherFactory or not be (odd)
     *                        ^
     * 
*/ def be[U](beMatcher: BeMatcher[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax given a MatcherFactory5, where file is a BePropertyMatcher: * *
     * aMatcherFactory or not be (file)
     *                        ^
     * 
*/ def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory5[SC with AnyRef with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(bePropertyMatcher)) () () /** * This method enables the following syntax given a MatcherFactory5, where validMarks is an AMatcher: * *
     * aMatcherFactory or not be a (validMarks)
     *                        ^
     * 
*/ def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax given a MatcherFactory5, where file is a BePropertyMatcher: * *
     * aMatcherFactory or not be a (file)
     *                        ^
     * 
*/ def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) () () /** * This method enables the following syntax given a MatcherFactory5, where apple is a BePropertyMatcher: * *
     * aMatcherFactory or not be an (apple)
     *                        ^
     * 
*/ def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory5, where invalidMarks is an AnMatcher: * *
     * aMatcherFactory and not be an (invalidMarks)
     *                         ^
     * 
*/ def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be a [Book]
     *                        ^
     * 
*/ inline def be(aType: ResultOfATypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = ${ MatcherFactory5.orNotATypeMatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]('{this}, '{aType}) } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be an [Apple]
     *                        ^
     * 
*/ inline def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = ${ MatcherFactory5.orNotAnTypeMatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]('{this}, '{anType}) } /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not be theSameInstanceAs (string)
     *                        ^
     * 
*/ def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax for the "primitive" numeric types: * *
     * aMatcherFactory or not be (17.0 +- 0.2)
     *                        ^
     * 
*/ def be[U](spread: Spread[U]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(spread)) /** * This method enables the following syntax, where fraction is a PartialFunction: * *
     * aMatcherFactory or not be definedAt (8)
     *                        ^
     * 
*/ def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory5[SC with U, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.be(resultOfDefinedAt)) /** * This method enables the following syntax, where fraction is a PartialFunction: * *
     * aMatcherFactory or not be sorted
     *                        ^
     * 
*/ def be(sortedWord: SortedWord) = thisMatcherFactory.or(MatcherWords.not.be(sortedWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory or not be readable
     *                        ^
     * 
*/ def be(readableWord: ReadableWord) = thisMatcherFactory.or(MatcherWords.not.be(readableWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory or not be writable
     *                        ^
     * 
*/ def be(writableWord: WritableWord) = thisMatcherFactory.or(MatcherWords.not.be(writableWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory or not be empty
     *                        ^
     * 
*/ def be(emptyWord: EmptyWord) = thisMatcherFactory.or(MatcherWords.not.be(emptyWord)) /** * This method enables the following syntax: * *
     * aMatcherFactory or not be defined
     *                        ^
     * 
*/ def be(definedWord: DefinedWord) = thisMatcherFactory.or(MatcherWords.not.be(definedWord)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not fullyMatch regex (decimal)
     *                        ^
     * 
*/ def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not include regex (decimal)
     *                        ^
     * 
*/ def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.include(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not include ("1.7")
     *                        ^
     * 
*/ def include(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.include(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not startWith regex (decimal)
     *                        ^
     * 
*/ def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not startWith ("1.7")
     *                        ^
     * 
*/ def startWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.startWith(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not endWith regex (decimal)
     *                        ^
     * 
*/ def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not endWith ("1.7")
     *                        ^
     * 
*/ def endWith(expectedSubstring: String): MatcherFactory5[SC with String, TC1, TC2, TC3, TC4, TC5] = thisMatcherFactory.or(MatcherWords.not.endWith(expectedSubstring)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain (3)
     *                        ^
     * 
*/ def contain[U](expectedElement: U): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(expectedElement)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain key ("three")
     *                        ^
     * 
*/ def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, KeyMapping] = thisMatcherFactory.or(MatcherWords.not.contain(resultOfKeyWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain value (3)
     *                        ^
     * 
*/ def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, ValueMapping] = thisMatcherFactory.or(MatcherWords.not.contain(resultOfValueWordApplication)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain oneOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain oneOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain atLeastOneOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain atLeastOneElementOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain noneOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfNoneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain noElementsOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfNoElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain theSameElementsAs (List(8, 1, 2))
     *                        ^
     * 
*/ def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain theSameElementsInOrderAs (List(8, 1, 2))
     *                        ^
     * 
*/ def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain only (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain inOrderOnly (8, 1, 2))
     *                        ^
     * 
*/ def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain allOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfAllOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain allOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfAllElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain inOrder (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfInOrderApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain inOrderElementsOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain atMostOneOf (8, 1, 2)
     *                        ^
     * 
*/ def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax given a MatcherFactory5: * *
     * aMatcherFactory or not contain atMostOneElementOf (List(8, 1, 2))
     *                        ^
     * 
*/ def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** * This method enables the following syntax: * *
     * aMatcherFactory or not matchPattern { case Person("Bob", _) =>}
     *                        ^
     * 
*/ inline def matchPattern(right: PartialFunction[Any, _]) = ${ MatcherFactory5.orNotMatchPattern('{this}, '{right}) } } /** * This method enables the following syntax given a MatcherFactory5: * *
   * aMatcherFactory or not contain value (3)
   *                 ^
   * 
*/ def or(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): OrNotWord = new OrNotWord(prettifier, pos) /** * This method enables the following syntax: * *
   * aMatcherFactory or exist
   *                 ^
   * 
*/ def or(existWord: ExistWord): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] = thisMatcherFactory.or(MatcherWords.exist.matcherFactory) /** * This method enables the following syntax: * *
   * aMatcherFactory or not (exist)
   *                 ^
   * 
*/ def or(notExist: ResultOfNotExist): MatcherFactory6[SC, TC1, TC2, TC3, TC4, TC5, Existence] = thisMatcherFactory.or(MatcherWords.not.exist) } /** * Companion object containing an implicit method that converts a MatcherFactory5 to a Matcher. * * @author Bill Venners */ object MatcherFactory5 { import scala.language.implicitConversions import scala.quoted._ /** * Converts a MatcherFactory5 to a Matcher. * * @param matcherFactory a MatcherFactory5 to convert * @return a Matcher produced by the passed MatcherFactory5 */ implicit def produceMatcher[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_], T <: SC : TC1 : TC2 : TC3 : TC4 : TC5](matcherFactory: MatcherFactory5[SC, TC1, TC2, TC3, TC4, TC5]): Matcher[T] = matcherFactory.matcher /** * This method is called by macro that supports 'and not a [Type]' syntax. */ def andNotATypeMatcherFactory5[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#AndNotWord], aType: Expr[ResultOfATypeInvocation[_]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val rhs = TypeMatcherMacro.notATypeMatcher(aType) '{ ($self).owner.and($rhs) } } /** * This method is called by macro that supports 'or not a [Type]' syntax. */ def orNotATypeMatcherFactory5[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#OrNotWord], aType: Expr[ResultOfATypeInvocation[_]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val rhs = TypeMatcherMacro.notATypeMatcher(aType) '{ ($self).owner.or($rhs) } } /** * This method is called by macro that supports 'and not a [Type]' syntax. */ def andNotAnTypeMatcherFactory5[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#AndNotWord], anType: Expr[ResultOfAnTypeInvocation[_]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val rhs = TypeMatcherMacro.notAnTypeMatcher(anType) '{ ($self).owner.and($rhs) } } /** * This method is called by macro that supports 'or not a [Type]' syntax. */ def orNotAnTypeMatcherFactory5[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#OrNotWord], anType: Expr[ResultOfAnTypeInvocation[_]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val rhs = TypeMatcherMacro.notAnTypeMatcher(anType) '{ ($self).owner.or($rhs) } } def andNotMatchPattern[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#AndNotWord], right: Expr[PartialFunction[Any, _]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val notMatcher = '{ MatchPatternHelper.notMatchPatternMatcher($right) } '{ ($self).owner.and($notMatcher) } } def orNotMatchPattern[SC: Type, TC1[_], TC2[_], TC3[_], TC4[_], TC5[_]](self: Expr[MatcherFactory5[SC & AnyRef, TC1, TC2, TC3, TC4, TC5]#OrNotWord], right: Expr[PartialFunction[Any, _]])(implicit qctx: QuoteContext, tp1: Type[TC1], tp2: Type[TC2], tp3: Type[TC3], tp4: Type[TC4], tp5: Type[TC5]): Expr[MatcherFactory5[SC with AnyRef, TC1, TC2, TC3, TC4, TC5]] = { val notMatcher = '{ MatchPatternHelper.notMatchPatternMatcher($right) } '{ ($self).owner.or($notMatcher) } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy