From a816fa5d73574333652e5fb47fe301f050137e79 Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 11:54:48 +0800 Subject: [PATCH 1/7] Added scala 3 infix keyword for DSL in FreeSpec style trait. --- .../org/scalatest/freespec/AnyFreeSpecLike.scala | 8 ++++++++ .../org/scalatest/freespec/AsyncFreeSpecLike.scala | 8 ++++++++ .../scalatest/freespec/FixtureAnyFreeSpecLike.scala | 12 ++++++++++++ .../freespec/FixtureAsyncFreeSpecLike.scala | 12 ++++++++++++ .../org/scalatest/freespec/PathAnyFreeSpecLike.scala | 8 ++++++++ 5 files changed, 48 insertions(+) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala index d5959d1ca7..e09361f4b0 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala @@ -213,6 +213,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def in(testFun: => Any /* Assertion */): Unit = { registerTestToRun(specText, tags, "in", () => testFun, pos) } @@ -233,6 +234,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerTestToRun(specText, tags, "is", () => { testFun; succeed }, pos) } @@ -253,6 +255,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def ignore(testFun: => Any /* Assertion */): Unit = { registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) } @@ -273,6 +276,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ + //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START @@ -309,6 +313,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def in(f: => Any /* Assertion */): Unit = { registerTestToRun(string, List(), "in", () => f, pos) } @@ -329,6 +334,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def ignore(f: => Any /* Assertion */): Unit = { registerTestToIgnore(string, List(), "ignore", () => f, pos) } @@ -349,6 +355,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def is(f: => PendingStatement): Unit = { registerTestToRun(string, List(), "is", () => { f; succeed }, pos) } @@ -369,6 +376,7 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * For more information and examples of this method's use, see the main documentation for trait AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*): ResultOfTaggedAsInvocationOnString = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList, pos) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala index 25a190f332..fd11c5c6bb 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala @@ -219,6 +219,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def in(testFun: => Future[compatible.Assertion]): Unit = { registerTestToRun(specText, tags, () => testFun, pos) } @@ -239,6 +240,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(specText, tags, () => testFun, pos) } @@ -259,6 +261,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) } @@ -279,6 +282,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ + //DOTTY-ONLY infix def -(fun: => Unit): Unit = { try { @@ -310,6 +314,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def in(f: => Future[compatible.Assertion]): Unit = { registerTestToRun(string, List(), () => f, pos) } @@ -330,6 +335,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def ignore(f: => Future[compatible.Assertion]): Unit = { registerTestToIgnore(string, List(), "ignore", () => f, pos) } @@ -350,6 +356,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def is(f: => PendingStatement): Unit = { registerPendingTestToRun(string, List(), () => f, pos) } @@ -370,6 +377,7 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * For more information and examples of this method's use, see the main documentation for trait AsyncFreeSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*): ResultOfTaggedAsInvocationOnString = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList, pos) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala index 5d71ad2a98..8ef5f2f183 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala @@ -237,6 +237,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { registerTestToRun(specText, tags, "in", testFun, pos) } @@ -259,6 +260,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: () => Any /* Assertion */): Unit = { registerTestToRun(specText, tags, "in", new NoArgTestWrapper(testFun), pos) } @@ -281,6 +283,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos) } @@ -303,6 +306,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { registerTestToIgnore(specText, tags, "ignore", testFun, pos) } @@ -325,6 +329,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: () => Any /* Assertion */): Unit = { registerTestToIgnore(specText, tags, "ignore", new NoArgTestWrapper(testFun), pos) } @@ -355,6 +360,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ + //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START @@ -393,6 +399,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { registerTestToRun(string, List(), "in", testFun, pos) } @@ -415,6 +422,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: () => Any /* Assertion */): Unit = { registerTestToRun(string, List(), "in", new NoArgTestWrapper(testFun), pos) } @@ -437,6 +445,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos) } @@ -459,6 +468,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { registerTestToIgnore(string, List(), "ignore", testFun, pos) } @@ -481,6 +491,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: () => Any /* Assertion */): Unit = { registerTestToIgnore(string, List(), "ignore", new NoArgTestWrapper(testFun), pos) } @@ -504,6 +515,7 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*): ResultOfTaggedAsInvocationOnString = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList, pos) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala index 00e6553f11..e12fef4e68 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala @@ -216,6 +216,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { registerAsyncTestToRun(specText, tags, "in", testFun, pos) } @@ -238,6 +239,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: () => Future[compatible.Assertion]): Unit = { registerAsyncTestToRun(specText, tags, "in", new NoArgTestWrapper(testFun), pos) } @@ -260,6 +262,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos) } @@ -282,6 +285,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { registerAsyncTestToIgnore(specText, tags, "ignore", testFun, pos) } @@ -304,6 +308,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { registerAsyncTestToIgnore(specText, tags, "ignore", new NoArgTestWrapper(testFun), pos) } @@ -334,6 +339,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ + //DOTTY-ONLY infix def -(fun: => Unit): Unit = { try { registerNestedBranch(string, None, fun, Resources.dashCannotAppearInsideAnIn, None, pos) @@ -366,6 +372,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { registerAsyncTestToRun(string, List(), "in", testFun, pos) } @@ -388,6 +395,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def in(testFun: () => Future[compatible.Assertion]): Unit = { registerAsyncTestToRun(string, List(), "in", new NoArgTestWrapper(testFun), pos) } @@ -410,6 +418,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos) } @@ -432,6 +441,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { registerAsyncTestToIgnore(string, List(), "ignore", testFun, pos) } @@ -454,6 +464,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param testFun the test function */ + //DOTTY-ONLY infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { registerAsyncTestToIgnore(string, List(), "ignore", new NoArgTestWrapper(testFun), pos) } @@ -477,6 +488,7 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*): ResultOfTaggedAsInvocationOnString = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList, pos) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala index aa583c6376..d2c31e7b1b 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala @@ -189,6 +189,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * trait org.scalatest.path.FreeSpec. *

*/ + //DOTTY-ONLY infix def in(testFun: => Unit /* Assertion */): Unit = { registerTestToRun(specText, tags, "in", () => testFun, pos) } @@ -216,6 +217,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * trait org.scalatest.freespec.PathAnyFreeSpec. *

*/ + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerTestToRun(specText, tags, "is", () => testFun, pos) } @@ -240,6 +242,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * be executed. Instead, a TestIgnored event will be fired. *

*/ + //DOTTY-ONLY infix def ignore(testFun: => Unit /* Assertion */): Unit = { registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) } @@ -263,6 +266,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * the How it executes section of the main documentation for trait * org.scalatest.freespec.PathAnyFreeSpec. */ + //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START @@ -303,6 +307,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * trait org.scalatest.freespec.PathAnyFreeSpec. *

*/ + //DOTTY-ONLY infix def in(f: => Unit /* Assertion */): Unit = { registerTestToRun(string, List(), "in", () => f, pos) } @@ -327,6 +332,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * be executed. Instead, a TestIgnored event will be fired. *

*/ + //DOTTY-ONLY infix def ignore(f: => Unit /* Assertion */): Unit = { registerTestToIgnore(string, List(), "ignore", () => f, pos) } @@ -354,6 +360,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * trait org.scalatest.freespec.PathAnyFreeSpec. *

*/ + //DOTTY-ONLY infix def is(f: => PendingStatement): Unit = { registerTestToRun(string, List(), "is", () => f, pos) } @@ -376,6 +383,7 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * trait org.scalatest.freespec.AnyFreeSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*): ResultOfTaggedAsInvocationOnString = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList, pos) From 787ddf517b751b40b22530a75e66613165d0da6e Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 16:14:48 +0800 Subject: [PATCH 2/7] Added scala 3 infix keyword for DSL in FlatSpec style trait. --- .../scalatest/flatspec/AnyFlatSpecLike.scala | 62 ++++++++----- .../flatspec/AsyncFlatSpecLike.scala | 62 ++++++++----- .../flatspec/FixtureAnyFlatSpecLike.scala | 92 +++++++++++-------- .../flatspec/FixtureAsyncFlatSpecLike.scala | 92 +++++++++++-------- 4 files changed, 194 insertions(+), 114 deletions(-) diff --git a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala index 69bb1e1afe..5efb2cb353 100644 --- a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala +++ b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala @@ -214,7 +214,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi ofImpl(description, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def of(description: String): Unit = { + //DOTTY-ONLY inline infix def of(description: String): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ofImpl(description, pos) }) } //DOTTY-ONLY } } @@ -300,7 +300,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -327,7 +327,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "is", tags, () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "is", tags, () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -354,7 +354,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -427,7 +427,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -453,7 +453,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "is", List(), () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "is", List(), () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -479,7 +479,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } @@ -500,6 +500,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -551,6 +552,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -570,6 +572,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -589,6 +592,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -608,6 +612,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -627,6 +632,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -646,6 +652,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -736,7 +743,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", () => testFun, pos) }) } //DOTTY-ONLY } @@ -771,7 +778,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, tags, "is", () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "is", () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -844,7 +851,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", () => testFun, pos) }) } //DOTTY-ONLY } @@ -878,7 +885,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, List(), "is", () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "is", () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -901,6 +908,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new IgnoreVerbStringTaggedAs(verb, name, tagList) @@ -944,6 +952,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new IgnoreVerbString("should", string) /** @@ -963,6 +972,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new IgnoreVerbString("must", string) /** @@ -982,6 +992,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new IgnoreVerbString("can", string) } @@ -1066,7 +1077,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -1093,7 +1104,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "is", tags, () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "is", tags, () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -1120,7 +1131,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1193,7 +1204,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -1219,7 +1230,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(verb.trim + " " + name.trim, "is", List(), () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "is", List(), () => { testFun; succeed }, pos) }) } //DOTTY-ONLY } @@ -1245,7 +1256,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } @@ -1266,6 +1277,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -1317,6 +1329,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -1336,6 +1349,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -1355,6 +1369,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -1374,6 +1389,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -1393,6 +1409,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -1412,6 +1429,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * in the main documentation for trait AnyFlatSpec. *

*/ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -1509,7 +1527,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -1535,7 +1553,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1617,7 +1635,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, "in", tagsList, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, "in", tagsList, () => testFun, pos) }) } //DOTTY-ONLY } @@ -1645,7 +1663,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1690,11 +1708,13 @@ import resultOfStringPassedToVerb.verb registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, "AnyFlatSpecLike.scala", "apply", stackDepth, 0, Some(pos)) new ResultOfStringPassedToVerb(verb, rest) { + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => { testFun; succeed }, pos) } // Note, won't have an is method that takes fixture => PendingStatement one, because don't want // to say is (fixture => pending), rather just say is (pending) + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) { diff --git a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala index b2f27588c4..c6434e5bf3 100644 --- a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala +++ b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala @@ -220,7 +220,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S ofImpl(description, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def of(description: String): Unit = { + //DOTTY-ONLY inline infix def of(description: String): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ofImpl(description, pos) }) } //DOTTY-ONLY } } @@ -306,7 +306,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -333,7 +333,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(verb.trim + " " + name.trim, "is", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, "is", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -360,7 +360,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -433,7 +433,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -459,7 +459,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(verb.trim + " " + name.trim, "is", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, "is", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -485,7 +485,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } @@ -506,6 +506,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -557,6 +558,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -576,6 +578,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -595,6 +598,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -614,6 +618,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -633,6 +638,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -652,6 +658,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -742,7 +749,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", () => testFun, pos) }) } //DOTTY-ONLY } @@ -777,7 +784,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, "is", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, "is", () => testFun, pos) }) } //DOTTY-ONLY } @@ -850,7 +857,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", () => testFun, pos) }) } //DOTTY-ONLY } @@ -884,7 +891,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), "is", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), "is", () => testFun, pos) }) } //DOTTY-ONLY } @@ -907,6 +914,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new IgnoreVerbStringTaggedAs(verb, name, tagList) @@ -950,6 +958,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new IgnoreVerbString("should", string) /** @@ -969,6 +978,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new IgnoreVerbString("must", string) /** @@ -988,6 +998,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new IgnoreVerbString("can", string) } @@ -1072,7 +1083,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -1099,7 +1110,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(verb.trim + " " + name.trim, "is", tags, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, "is", tags, () => testFun, pos) }) } //DOTTY-ONLY } @@ -1127,7 +1138,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1200,7 +1211,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -1226,7 +1237,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(verb.trim + " " + name.trim, "is", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, "is", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -1252,7 +1263,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } @@ -1273,6 +1284,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -1324,6 +1336,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -1343,6 +1356,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -1362,6 +1376,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -1381,6 +1396,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -1400,6 +1416,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -1419,6 +1436,7 @@ trait AsyncFlatSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * in the main documentation for trait AsyncFlatSpec. *

*/ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -1516,7 +1534,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, "in", List(), () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, "in", List(), () => testFun, pos) }) } //DOTTY-ONLY } @@ -1542,7 +1560,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1624,7 +1642,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, "in", tagsList, () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, "in", tagsList, () => testFun, pos) }) } //DOTTY-ONLY } @@ -1652,7 +1670,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -1693,11 +1711,13 @@ import resultOfStringPassedToVerb.verb registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, pos) new ResultOfStringPassedToVerb(verb, rest) { + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => testFun, pos) } // Note, won't have an is method that takes fixture => PendingStatement one, because don't want // to say is (fixture => pending), rather just say is (pending) + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) { diff --git a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala index 0324fc78a8..597a4bfecf 100644 --- a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala +++ b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala @@ -229,7 +229,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca ofImpl(description, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def of(description: String): Unit = { + //DOTTY-ONLY inline infix def of(description: String): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ofImpl(description, pos) }) } //DOTTY-ONLY } } @@ -325,7 +325,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -353,7 +353,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -382,7 +382,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -415,7 +415,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -445,7 +445,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", testFun, pos) }) } //DOTTY-ONLY } } @@ -527,7 +527,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -555,7 +555,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -583,7 +583,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -615,7 +615,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -643,7 +643,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", testFun, pos) }) } //DOTTY-ONLY } @@ -667,6 +667,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -720,6 +721,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -741,6 +743,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -762,6 +765,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -783,6 +787,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -804,6 +809,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -825,6 +831,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -926,7 +933,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -954,7 +961,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -983,7 +990,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -1016,7 +1023,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1046,7 +1053,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "ignore", testFun, pos) }) } //DOTTY-ONLY } } @@ -1128,7 +1135,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1156,7 +1163,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -1184,7 +1191,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -1216,7 +1223,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1244,7 +1251,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "ignore", testFun, pos) }) } //DOTTY-ONLY } @@ -1268,6 +1275,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -1321,6 +1329,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -1342,6 +1351,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -1363,6 +1373,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -1384,6 +1395,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -1405,6 +1417,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -1426,6 +1439,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -1527,7 +1541,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1557,7 +1571,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -1594,7 +1608,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } } @@ -1674,7 +1688,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1703,7 +1717,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + name.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -1739,7 +1753,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -1765,6 +1779,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new IgnoreVerbStringTaggedAs(verb, name, tagList) @@ -1809,6 +1824,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new IgnoreVerbString("should", string) /** @@ -1830,6 +1846,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new IgnoreVerbString("must", string) /** @@ -1851,6 +1868,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new IgnoreVerbString("can", string) } @@ -1915,7 +1933,7 @@ trait FixtureAnyFlatSpecLike extends org.scalatest.FixtureTestSuite with org.sca protected final class InAndIgnoreMethods(resultOfStringPassedToVerb: ResultOfStringPassedToVerb) { import resultOfStringPassedToVerb.rest -import resultOfStringPassedToVerb.verb + import resultOfStringPassedToVerb.verb private final def inImpl(testFun: () => Any /* Assertion */, pos: source.Position): Unit = { registerTestToRun(verb.trim + " " + rest.trim, List(), "in", new NoArgTestWrapper(testFun), pos) @@ -1945,7 +1963,7 @@ import resultOfStringPassedToVerb.verb inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1977,7 +1995,7 @@ import resultOfStringPassedToVerb.verb ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -2005,7 +2023,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -2033,7 +2051,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, List(), "ignore", testFun, pos) }) } //DOTTY-ONLY } } @@ -2126,7 +2144,7 @@ import resultOfStringPassedToVerb.verb inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -2160,7 +2178,7 @@ import resultOfStringPassedToVerb.verb ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -2188,7 +2206,7 @@ import resultOfStringPassedToVerb.verb registerTestToRun(verb.trim + " " + rest.trim, tagsList, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(verb.trim + " " + rest.trim, tagsList, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -2218,7 +2236,7 @@ import resultOfStringPassedToVerb.verb registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(verb.trim + " " + rest.trim, tagsList, "ignore", testFun, pos) }) } //DOTTY-ONLY } } @@ -2264,9 +2282,11 @@ import resultOfStringPassedToVerb.verb //SCALATESTJS,NATIVE-ONLY val stackDepth = 8 registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, sourceFileName, "apply", stackDepth, 0, Some(pos)) new ResultOfStringPassedToVerb(verb, rest) { + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos) } + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) { diff --git a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala index 876bf1e5a2..4f31d1c51a 100644 --- a/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala +++ b/jvm/flatspec/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala @@ -210,7 +210,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with ofImpl(description, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def of(description: String): Unit = { + //DOTTY-ONLY inline infix def of(description: String): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ofImpl(description, pos) }) } //DOTTY-ONLY } } @@ -306,7 +306,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -334,7 +334,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -363,7 +363,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -396,7 +396,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -426,7 +426,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) }) } //DOTTY-ONLY } } @@ -508,7 +508,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -536,7 +536,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -564,7 +564,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -596,7 +596,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -624,7 +624,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) }) } //DOTTY-ONLY } @@ -648,6 +648,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -701,6 +702,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -722,6 +724,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -743,6 +746,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -764,6 +768,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -785,6 +790,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -806,6 +812,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -907,7 +914,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -935,7 +942,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + name.trim, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -964,7 +971,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -997,7 +1004,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1027,7 +1034,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) }) } //DOTTY-ONLY } } @@ -1109,7 +1116,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1137,7 +1144,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + name.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -1165,7 +1172,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(verb.trim + " " + name.trim, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -1197,7 +1204,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1225,7 +1232,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) }) } //DOTTY-ONLY } @@ -1249,6 +1256,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ItVerbStringTaggedAs(verb, name, tagList) @@ -1302,6 +1310,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new ItVerbString("should", string) /** @@ -1323,6 +1332,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new ItVerbString("must", string) /** @@ -1344,6 +1354,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new ItVerbString("can", string) /** @@ -1365,6 +1376,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -1386,6 +1398,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord /** @@ -1407,6 +1420,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def can(behaveWord: BehaveWord) = behaveWord } @@ -1508,7 +1522,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1538,7 +1552,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, tags, testFun, pos) }) } //DOTTY-ONLY } @@ -1575,7 +1589,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, tags, unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } } @@ -1655,7 +1669,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1684,7 +1698,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + name.trim, List(), testFun, pos) }) } //DOTTY-ONLY } @@ -1720,7 +1734,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToIgnore(verb.trim + " " + name.trim, List(), unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -1746,6 +1760,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * @param firstTestTag the first mandatory test tag * @param otherTestTags the others additional test tags */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new IgnoreVerbStringTaggedAs(verb, name, tagList) @@ -1790,6 +1805,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def should(string: String) = new IgnoreVerbString("should", string) /** @@ -1811,6 +1827,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def must(string: String) = new IgnoreVerbString("must", string) /** @@ -1832,6 +1849,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with * * @param string the string description */ + //DOTTY-ONLY infix def can(string: String) = new IgnoreVerbString("can", string) } @@ -1896,7 +1914,7 @@ trait FixtureAsyncFlatSpecLike extends org.scalatest.FixtureAsyncTestSuite with protected final class InAndIgnoreMethods(resultOfStringPassedToVerb: ResultOfStringPassedToVerb) { import resultOfStringPassedToVerb.rest -import resultOfStringPassedToVerb.verb + import resultOfStringPassedToVerb.verb private final def inImpl(testFun: () => Future[compatible.Assertion], pos: source.Position): Unit = { registerAsyncTestToRun(verb.trim + " " + rest.trim, List(), "in", new NoArgTestWrapper(testFun), pos) @@ -1926,7 +1944,7 @@ import resultOfStringPassedToVerb.verb inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1958,7 +1976,7 @@ import resultOfStringPassedToVerb.verb ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -1986,7 +2004,7 @@ import resultOfStringPassedToVerb.verb registerAsyncTestToRun(verb.trim + " " + rest.trim, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + rest.trim, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -2014,7 +2032,7 @@ import resultOfStringPassedToVerb.verb registerAsyncTestToIgnore(verb.trim + " " + rest.trim, List(), testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + rest.trim, List(), testFun, pos) }) } //DOTTY-ONLY } } @@ -2107,7 +2125,7 @@ import resultOfStringPassedToVerb.verb inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -2141,7 +2159,7 @@ import resultOfStringPassedToVerb.verb ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -2169,7 +2187,7 @@ import resultOfStringPassedToVerb.verb registerAsyncTestToRun(verb.trim + " " + rest.trim, tagsList, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(verb.trim + " " + rest.trim, tagsList, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -2199,7 +2217,7 @@ import resultOfStringPassedToVerb.verb registerAsyncTestToIgnore(verb.trim + " " + rest.trim, tagsList, testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(verb.trim + " " + rest.trim, tagsList, testFun, pos) }) } //DOTTY-ONLY } } @@ -2241,9 +2259,11 @@ import resultOfStringPassedToVerb.verb def apply(subject: String, verb: String, rest: String, pos: source.Position): ResultOfStringPassedToVerb = { registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, pos) new ResultOfStringPassedToVerb(verb, rest) { + //DOTTY-ONLY infix def is(testFun: => PendingStatement): Unit = { registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos) } + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) { From 91192f216523bb2a1041fa30b43c36f60029e4ba Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 16:49:22 +0800 Subject: [PATCH 3/7] Added scala 3 infix keyword for DSL in FunSpec style trait. --- .../src/main/scala/org/scalatest/funspec/AnyFunSpecLike.scala | 4 ++++ .../main/scala/org/scalatest/funspec/AsyncFunSpecLike.scala | 4 ++++ .../scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala | 4 ++++ .../scala/org/scalatest/funspec/FixtureAsyncFunSpecLike.scala | 4 ++++ .../main/scala/org/scalatest/funspec/PathAnyFunSpecLike.scala | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/jvm/funspec/src/main/scala/org/scalatest/funspec/AnyFunSpecLike.scala b/jvm/funspec/src/main/scala/org/scalatest/funspec/AnyFunSpecLike.scala index 7b3e20754d..3ee7494fa7 100644 --- a/jvm/funspec/src/main/scala/org/scalatest/funspec/AnyFunSpecLike.scala +++ b/jvm/funspec/src/main/scala/org/scalatest/funspec/AnyFunSpecLike.scala @@ -218,6 +218,7 @@ trait AnyFunSpecLike extends TestSuite with TestRegistration with Informing with * in the main documentation for trait AnyFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -237,6 +238,7 @@ trait AnyFunSpecLike extends TestSuite with TestRegistration with Informing with * in the main documentation for trait AnyFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } @@ -339,6 +341,7 @@ trait AnyFunSpecLike extends TestSuite with TestRegistration with Informing with * in the main documentation for trait AnyFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -358,6 +361,7 @@ trait AnyFunSpecLike extends TestSuite with TestRegistration with Informing with * in the main documentation for trait AnyFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } diff --git a/jvm/funspec/src/main/scala/org/scalatest/funspec/AsyncFunSpecLike.scala b/jvm/funspec/src/main/scala/org/scalatest/funspec/AsyncFunSpecLike.scala index 02308d3784..945b897332 100644 --- a/jvm/funspec/src/main/scala/org/scalatest/funspec/AsyncFunSpecLike.scala +++ b/jvm/funspec/src/main/scala/org/scalatest/funspec/AsyncFunSpecLike.scala @@ -198,6 +198,7 @@ trait AsyncFunSpecLike extends AsyncTestSuite with AsyncTestRegistration with In * in the main documentation for trait AsyncFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -217,6 +218,7 @@ trait AsyncFunSpecLike extends AsyncTestSuite with AsyncTestRegistration with In * in the main documentation for trait AsyncFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } @@ -319,6 +321,7 @@ trait AsyncFunSpecLike extends AsyncTestSuite with AsyncTestRegistration with In * in the main documentation for trait AsyncFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -338,6 +341,7 @@ trait AsyncFunSpecLike extends AsyncTestSuite with AsyncTestRegistration with In * in the main documentation for trait AsyncFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } diff --git a/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala b/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala index c7d973e536..e316b29562 100644 --- a/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala +++ b/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAnyFunSpecLike.scala @@ -238,6 +238,7 @@ trait FixtureAnyFunSpecLike extends org.scalatest.FixtureTestSuite with org.scal * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -259,6 +260,7 @@ trait FixtureAnyFunSpecLike extends org.scalatest.FixtureTestSuite with org.scal * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } @@ -387,6 +389,7 @@ trait FixtureAnyFunSpecLike extends org.scalatest.FixtureTestSuite with org.scal * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -408,6 +411,7 @@ trait FixtureAnyFunSpecLike extends org.scalatest.FixtureTestSuite with org.scal * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } diff --git a/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAsyncFunSpecLike.scala b/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAsyncFunSpecLike.scala index c18f6dd971..911ca60108 100644 --- a/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAsyncFunSpecLike.scala +++ b/jvm/funspec/src/main/scala/org/scalatest/funspec/FixtureAsyncFunSpecLike.scala @@ -216,6 +216,7 @@ trait FixtureAsyncFunSpecLike extends org.scalatest.FixtureAsyncTestSuite with o * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -237,6 +238,7 @@ trait FixtureAsyncFunSpecLike extends org.scalatest.FixtureAsyncTestSuite with o * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } @@ -358,6 +360,7 @@ trait FixtureAsyncFunSpecLike extends org.scalatest.FixtureAsyncTestSuite with o * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -379,6 +382,7 @@ trait FixtureAsyncFunSpecLike extends org.scalatest.FixtureAsyncTestSuite with o * * @param behaveWord the BehaveWord */ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } diff --git a/jvm/funspec/src/main/scala/org/scalatest/funspec/PathAnyFunSpecLike.scala b/jvm/funspec/src/main/scala/org/scalatest/funspec/PathAnyFunSpecLike.scala index abbbe0b80a..c047af30f3 100644 --- a/jvm/funspec/src/main/scala/org/scalatest/funspec/PathAnyFunSpecLike.scala +++ b/jvm/funspec/src/main/scala/org/scalatest/funspec/PathAnyFunSpecLike.scala @@ -181,6 +181,7 @@ trait PathAnyFunSpecLike extends org.scalatest.Suite with OneInstancePerTest wit * in the main documentation for trait org.scalatest.funspec.PathAnyFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -200,6 +201,7 @@ trait PathAnyFunSpecLike extends org.scalatest.Suite with OneInstancePerTest wit * in the main documentation for trait org.scalatest.funspec.PathAnyFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } @@ -302,6 +304,7 @@ trait PathAnyFunSpecLike extends org.scalatest.Suite with OneInstancePerTest wit * in the main documentation for trait org.scalatest.funspec.PathAnyFunSpec. *

*/ + //DOTTY-ONLY infix def should(behaveWord: BehaveWord) = behaveWord /** @@ -321,6 +324,7 @@ trait PathAnyFunSpecLike extends org.scalatest.Suite with OneInstancePerTest wit * in the main documentation for trait org.scalatest.funspec.PathAnyFunSpec. *

*/ + //DOTTY-ONLY infix def must(behaveWord: BehaveWord) = behaveWord } From ee66a2a6e643da1c9aee3d846daaf94e72db5774 Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 17:43:41 +0800 Subject: [PATCH 4/7] Added scala 3 infix keyword for DSL in WordSpec style trait. --- .../scalatest/wordspec/AnyWordSpecLike.scala | 41 ++++++++-------- .../wordspec/AsyncWordSpecLike.scala | 41 ++++++++-------- .../wordspec/FixtureAnyWordSpecLike.scala | 49 ++++++++++--------- .../wordspec/FixtureAsyncWordSpecLike.scala | 49 ++++++++++--------- 4 files changed, 92 insertions(+), 88 deletions(-) diff --git a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AnyWordSpecLike.scala b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AnyWordSpecLike.scala index 68ac60a914..b524c792e6 100644 --- a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AnyWordSpecLike.scala +++ b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AnyWordSpecLike.scala @@ -305,7 +305,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(specText, tags, "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(specText, tags, "in", () => testFun, pos)}) } //DOTTY-ONLY } @@ -330,7 +330,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(specText, tags, "is", () => { testFun; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(specText, tags, "is", () => { testFun; succeed }, pos)}) } //DOTTY-ONLY } @@ -355,7 +355,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(specText, tags, "ignore", () => testFun, pos)}) } //DOTTY-ONLY } } @@ -398,7 +398,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(string, List(), "in", () => f, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(f: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(f: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(string, List(), "in", () => f, pos)}) } //DOTTY-ONLY } @@ -423,7 +423,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToIgnore(string, List(), "ignore", () => f, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(f: => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(f: => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(string, List(), "ignore", () => f, pos)}) } //DOTTY-ONLY } @@ -448,7 +448,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerTestToRun(string, List(), "is", () => { f; succeed }, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(f: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(f: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(string, List(), "is", () => { f; succeed }, pos)}) } //DOTTY-ONLY } @@ -468,6 +468,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi * For more information and examples of this method's use, see the main documentation for trait AnyWordSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList) @@ -498,7 +499,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string, Some("when"), "when", "when", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when"), "when", "when", 4, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -525,7 +526,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", "when", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", "when", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } @@ -554,7 +555,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string.trim + " that", None, "that", "that", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def that(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that", None, "that", "that", 4, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -583,7 +584,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string.trim + " which", None, "which", "which", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def which(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which", None, "which", "which", 4, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -610,7 +611,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", "that", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", "that", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } @@ -637,7 +638,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", "which", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", "which", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } } @@ -810,7 +811,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -842,7 +843,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -874,7 +875,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -906,7 +907,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } @@ -981,7 +982,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -1013,7 +1014,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerShorthandBranch(Some("must"), Resources.theyMustAppearAfterTopLevelSubject, "must", stackDepth, -2, pos, () => right)}) } //DOTTY-ONLY } @@ -1045,7 +1046,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerShorthandBranch(Some("can"), Resources.theyMustAppearAfterTopLevelSubject, "can", stackDepth, -2, pos, () => right)}) } //DOTTY-ONLY } @@ -1077,7 +1078,7 @@ trait AnyWordSpecLike extends TestSuite with TestRegistration with ShouldVerb wi whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } diff --git a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AsyncWordSpecLike.scala b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AsyncWordSpecLike.scala index b6912a818c..66adddf9a9 100644 --- a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AsyncWordSpecLike.scala +++ b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/AsyncWordSpecLike.scala @@ -310,7 +310,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(specText, tags, "in", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(specText, tags, "in", () => testFun, pos) }) } //DOTTY-ONLY } @@ -335,7 +335,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(specText, tags, "is", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(specText, tags, "is", () => testFun, pos) }) } //DOTTY-ONLY } @@ -360,7 +360,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: => Future[compatible.Assertion]) = { + //DOTTY-ONLY inline infix def ignore(testFun: => Future[compatible.Assertion]) = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(specText, tags, "ignore", () => testFun, pos) }) } //DOTTY-ONLY } } @@ -403,7 +403,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToRun(string, List(), "in", () => f, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(f: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(f: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(string, List(), "in", () => f, pos) }) } //DOTTY-ONLY } @@ -428,7 +428,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerTestToIgnore(string, List(), "ignore", () => f, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(f: => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(f: => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(string, List(), "ignore", () => f, pos) }) } //DOTTY-ONLY } @@ -453,7 +453,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerPendingTestToRun(string, List(), "is", () => f, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(f: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(f: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(string, List(), "is", () => f, pos) }) } //DOTTY-ONLY } @@ -473,6 +473,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S * For more information and examples of this method's use, see the main documentation for trait AnyWordSpec. *

*/ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList) @@ -499,7 +500,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string, Some("when"), "when", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(f: => Unit)(implicit pos: source.Position): Unit = { + //DOTTY-ONLY inline infix def when(f: => Unit)(implicit pos: source.Position): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when"), "when", pos, () => f) }) } //DOTTY-ONLY } @@ -526,7 +527,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } @@ -551,7 +552,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string.trim + " that", None, "that", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def that(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that", None, "that", pos, () => f) }) } //DOTTY-ONLY } @@ -576,7 +577,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string.trim + " which", None, "which", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def which(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which", None, "which", pos, () => f) }) } //DOTTY-ONLY } @@ -603,7 +604,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } @@ -630,7 +631,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } } @@ -803,7 +804,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -835,7 +836,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -867,7 +868,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -899,7 +900,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } @@ -974,7 +975,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -1006,7 +1007,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -1038,7 +1039,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -1070,7 +1071,7 @@ trait AsyncWordSpecLike extends AsyncTestSuite with AsyncTestRegistration with S whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } diff --git a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAnyWordSpecLike.scala b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAnyWordSpecLike.scala index f4b1c5a0a9..3ff7464322 100644 --- a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAnyWordSpecLike.scala +++ b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAnyWordSpecLike.scala @@ -327,7 +327,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(specText, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(specText, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -354,7 +354,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(specText, tags, "in", new org.scalatest.fixture.NoArgTestWrapper(testFun), pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(specText, tags, "in", new org.scalatest.fixture.NoArgTestWrapper(testFun), pos) }) } //DOTTY-ONLY } @@ -381,7 +381,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos)}) } //DOTTY-ONLY } @@ -408,7 +408,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(specText, tags, "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(specText, tags, "ignore", testFun, pos)}) } //DOTTY-ONLY } @@ -439,7 +439,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } } @@ -486,7 +486,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToRun(string, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToRun(string, List(), "in", testFun, pos)}) } //DOTTY-ONLY } @@ -517,7 +517,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -544,7 +544,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos)}) } //DOTTY-ONLY } @@ -571,7 +571,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerTestToIgnore(string, List(), "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerTestToIgnore(string, List(), "ignore", testFun, pos)}) } //DOTTY-ONLY } @@ -602,7 +602,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Any /* Assertion */): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Any /* Assertion */): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -626,6 +626,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca * @param otherTestTags the others additional test tags * @return an new instance of ResultOfTaggedAsInvocationOnString */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList) @@ -658,7 +659,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string, Some("when"), "when", "when", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when"), "when", "when", 4, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -687,7 +688,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", "when", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", "when", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } @@ -718,7 +719,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string.trim + " that", None, "that", "that", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def that(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that", None, "that", "that", stackDepth, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -749,7 +750,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string.trim + " which", None, "which", "which", stackDepth, -2, pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def which(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which", None, "which", "which", stackDepth, -2, pos, () => f)}) } //DOTTY-ONLY } @@ -776,7 +777,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", "that", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", "that", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } @@ -803,7 +804,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", "which", 4, -2, pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", "which", 4, -2, pos, resultOfAfterWordApplication.f)}) } //DOTTY-ONLY } } @@ -988,7 +989,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -1022,7 +1023,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -1056,7 +1057,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -1090,7 +1091,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } @@ -1167,7 +1168,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -1201,7 +1202,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -1235,7 +1236,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -1269,7 +1270,7 @@ trait FixtureAnyWordSpecLike extends org.scalatest.FixtureTestSuite with org.sca whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } diff --git a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAsyncWordSpecLike.scala b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAsyncWordSpecLike.scala index 53b08a6de6..505bc9434c 100644 --- a/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAsyncWordSpecLike.scala +++ b/jvm/wordspec/src/main/scala/org/scalatest/wordspec/FixtureAsyncWordSpecLike.scala @@ -303,7 +303,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(specText, tags, "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(specText, tags, "in", testFun, pos) }) } //DOTTY-ONLY } @@ -334,7 +334,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -361,7 +361,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(specText, tags, "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -388,7 +388,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(specText, tags, "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(specText, tags, "ignore", testFun, pos) }) } //DOTTY-ONLY } @@ -415,7 +415,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(specText, tags, "ignore", new org.scalatest.fixture.NoArgTestWrapper(testFun), pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(specText, tags, "ignore", new org.scalatest.fixture.NoArgTestWrapper(testFun), pos) }) } //DOTTY-ONLY } } @@ -462,7 +462,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToRun(string, List(), "in", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToRun(string, List(), "in", testFun, pos) }) } //DOTTY-ONLY } @@ -493,7 +493,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with inImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def in(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def in(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => inImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -520,7 +520,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def is(testFun: => PendingStatement): Unit = { + //DOTTY-ONLY inline infix def is(testFun: => PendingStatement): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerPendingTestToRun(string, List(), "is", unusedFixtureParam => testFun, pos) }) } //DOTTY-ONLY } @@ -547,7 +547,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerAsyncTestToIgnore(string, List(), "ignore", testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: FixtureParam => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerAsyncTestToIgnore(string, List(), "ignore", testFun, pos) }) } //DOTTY-ONLY } @@ -578,7 +578,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with ignoreImpl(testFun, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def ignore(testFun: () => Future[compatible.Assertion]): Unit = { + //DOTTY-ONLY inline infix def ignore(testFun: () => Future[compatible.Assertion]): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => ignoreImpl(testFun, pos) }) } //DOTTY-ONLY } @@ -602,6 +602,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with * @param otherTestTags the others additional test tags * @return an new instance of ResultOfTaggedAsInvocationOnString */ + //DOTTY-ONLY infix def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = { val tagList = firstTestTag :: otherTestTags.toList new ResultOfTaggedAsInvocationOnString(string, tagList) @@ -630,7 +631,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string, Some("when"), "when", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when"), "when", pos, () => f) }) } //DOTTY-ONLY } @@ -659,7 +660,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def when(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string, Some("when " + resultOfAfterWordApplication.text), "when", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } @@ -686,7 +687,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string.trim + " that", None, "that", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def that(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that", None, "that", pos, () => f) }) } //DOTTY-ONLY } @@ -713,7 +714,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string.trim + " which", None, "which", pos, () => f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(f: => Unit): Unit = { + //DOTTY-ONLY inline infix def which(f: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which", None, "which", pos, () => f) }) } //DOTTY-ONLY } @@ -740,7 +741,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def that(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " that " + resultOfAfterWordApplication.text.trim, None, "that", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } @@ -767,7 +768,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", pos, resultOfAfterWordApplication.f) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { + //DOTTY-ONLY inline infix def which(resultOfAfterWordApplication: ResultOfAfterWordApplication): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => registerBranch(string.trim + " which " + resultOfAfterWordApplication.text.trim, None, "which", pos, resultOfAfterWordApplication.f) }) } //DOTTY-ONLY } } @@ -947,7 +948,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -981,7 +982,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -1015,7 +1016,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -1049,7 +1050,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } @@ -1126,7 +1127,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with shouldImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def should(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def should(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => shouldImpl(right, pos) }) } //DOTTY-ONLY } @@ -1160,7 +1161,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with mustImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def must(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def must(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => mustImpl(right, pos) }) } //DOTTY-ONLY } @@ -1194,7 +1195,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with canImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def can(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def can(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => canImpl(right, pos) }) } //DOTTY-ONLY } @@ -1228,7 +1229,7 @@ trait FixtureAsyncWordSpecLike extends org.scalatest.FixtureAsyncTestSuite with whenImpl(right, pos) } // SKIP-DOTTY-END - //DOTTY-ONLY inline def when(right: => Unit): Unit = { + //DOTTY-ONLY inline infix def when(right: => Unit): Unit = { //DOTTY-ONLY ${ source.Position.withPosition[Unit]('{(pos: source.Position) => whenImpl(right, pos) }) } //DOTTY-ONLY } } From dcb74a4db3c191197b2d4f161621c78766d35156 Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 21:32:13 +0800 Subject: [PATCH 5/7] Added infix modifier to functions in GenFactoriesDotty.scala. --- project/GenFactoriesDotty.scala | 456 ++++++++++++++++---------------- 1 file changed, 228 insertions(+), 228 deletions(-) diff --git a/project/GenFactoriesDotty.scala b/project/GenFactoriesDotty.scala index 74537c53a3..051d1b1bb5 100644 --- a/project/GenFactoriesDotty.scala +++ b/project/GenFactoriesDotty.scala @@ -145,7 +145,7 @@ $endif$ /** * Ands this matcher factory with the passed matcher. */ - def and[U <: SC](rightMatcher: Matcher[U]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = + infix def and[U <: SC](rightMatcher: Matcher[U]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = new MatcherFactory$arity$[U, $commaSeparatedTCNs$] { def matcher[V <: U : $colonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -162,7 +162,7 @@ $endif$ /** * Ors this matcher factory with the passed matcher. */ - def or[U <: SC](rightMatcher: Matcher[U]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = + infix def or[U <: SC](rightMatcher: Matcher[U]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = new MatcherFactory$arity$[U, $commaSeparatedTCNs$] { def matcher[V <: U : $colonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -179,7 +179,7 @@ $endif$ /** * Ands this matcher factory with the passed MatcherFactory1 that has the same final typeclass as this one. */ - def and[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC$arity$]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = + infix def and[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC$arity$]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = new MatcherFactory$arity$[U, $commaSeparatedTCNs$] { def matcher[V <: U : $colonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -197,7 +197,7 @@ $endif$ /** * Ors this matcher factory with the passed MatcherFactory1 that has the same final typeclass as this one. */ - def or[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC$arity$]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = + infix def or[U <: SC](rightMatcherFactory: MatcherFactory1[U, TC$arity$]): MatcherFactory$arity$[U, $commaSeparatedTCNs$] = new MatcherFactory$arity$[U, $commaSeparatedTCNs$] { def matcher[V <: U : $colonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -235,7 +235,7 @@ $endif$ /** * Ands this matcher factory with the passed matcher factory. */ - def and[U <: SC, $passedTypeConstructors$](rightMatcherFactory: MatcherFactory$passedArity$[U, $passedCommaSeparatedTCNs$]): MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] = + infix def and[U <: SC, $passedTypeConstructors$](rightMatcherFactory: MatcherFactory$passedArity$[U, $passedCommaSeparatedTCNs$]): MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] = new MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] { def matcher[V <: U : $resultColonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -251,7 +251,7 @@ $endif$ /** * Ors this matcher factory with the passed matcher factory. */ - def or[U <: SC, $passedTypeConstructors$](rightMatcherFactory: MatcherFactory$passedArity$[U, $passedCommaSeparatedTCNs$]): MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] = + infix def or[U <: SC, $passedTypeConstructors$](rightMatcherFactory: MatcherFactory$passedArity$[U, $passedCommaSeparatedTCNs$]): MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] = new MatcherFactory$resultArity$[U, $resultCommaSeparatedTCNs$] { def matcher[V <: U : $resultColonSeparatedTCNs$]: Matcher[V] = { new Matcher[V] { @@ -282,7 +282,7 @@ $endif$ * ^ * */ - def length(expectedLength: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = and(MatcherWords.have.length(expectedLength)) + infix def length(expectedLength: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, 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. @@ -294,7 +294,7 @@ $endif$ * ^ * */ - def size(expectedSize: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = and(MatcherWords.have.size(expectedSize)) + infix def size(expectedSize: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = and(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -304,7 +304,7 @@ $endif$ * ^ * */ - def message(expectedMessage: String): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = and(MatcherWords.have.message(expectedMessage)) + infix def message(expectedMessage: String): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = and(MatcherWords.have.message(expectedMessage)) } /** @@ -315,7 +315,7 @@ $endif$ * ^ * */ - def and(haveWord: HaveWord): AndHaveWord = new AndHaveWord + infix 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 @@ -345,7 +345,7 @@ $endif$ * ^ * */ - def key(expectedKey: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.and(MatcherWords.contain.key(expectedKey)) + infix def key(expectedKey: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.and(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -355,7 +355,7 @@ $endif$ * ^ * */ - def value(expectedValue: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = thisMatcherFactory.and(MatcherWords.contain.value(expectedValue)) + infix def value(expectedValue: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, 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. @@ -367,7 +367,7 @@ $endif$ * ^ * */ - def theSameElementsAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def theSameElementsAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.theSameElementsAs(right)) /** @@ -378,7 +378,7 @@ $endif$ * ^ * */ - def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.theSameElementsInOrderAs(right)) /** @@ -389,7 +389,7 @@ $endif$ * ^ * */ - def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -400,7 +400,7 @@ $endif$ * ^ * */ - def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles .toList: _*)(prettifier, pos)) /** @@ -411,7 +411,7 @@ $endif$ * ^ * */ - def allElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def allElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.allElementsOf(elements)) /** @@ -422,7 +422,7 @@ $endif$ * ^ * */ - def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -433,7 +433,7 @@ $endif$ * ^ * */ - def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.contain.inOrderElementsOf(elements)) /** @@ -444,7 +444,7 @@ $endif$ * ^ * */ - def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -455,7 +455,7 @@ $endif$ * ^ * */ - def oneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def oneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.contain.oneElementOf(elements)) /** @@ -466,7 +466,7 @@ $endif$ * ^ * */ - def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -477,7 +477,7 @@ $endif$ * ^ * */ - def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atLeastOneElementOf(elements)) /** @@ -488,7 +488,7 @@ $endif$ * ^ * */ - def only(right: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def only(right: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** @@ -499,7 +499,7 @@ $endif$ * ^ * */ - def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -510,7 +510,7 @@ $endif$ * ^ * */ - def noElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def noElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.contain.noElementsOf(elements)) /** @@ -521,7 +521,7 @@ $endif$ * ^ * */ - def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -532,7 +532,7 @@ $endif$ * ^ * */ - def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.contain.atMostOneElementOf(elements)) } @@ -544,7 +544,7 @@ $endif$ * ^ * */ - def and(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): AndContainWord = new AndContainWord(prettifier, pos) + infix 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 @@ -563,7 +563,7 @@ $endif$ * ^ * */ - def a(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.a(symbol)) + infix def a(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.a(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -574,7 +574,7 @@ $endif$ * ^ * */ - def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = and(MatcherWords.be.a(bePropertyMatcher)) + infix def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = and(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$, where validNumber is an AMatcher: @@ -584,7 +584,7 @@ $endif$ * ^ * */ - def a[U](aMatcher: AMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.a(aMatcher)) + infix def a[U](aMatcher: AMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.a(aMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -595,7 +595,7 @@ $endif$ * ^ * */ - def an(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.an(symbol)) + infix def an(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.an(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -606,7 +606,7 @@ $endif$ * ^ * */ - def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = and(MatcherWords.be.an(bePropertyMatcher)) + infix def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = and(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$, where integerNumber is an AnMatcher: @@ -616,7 +616,7 @@ $endif$ * ^ * */ - def an[U](anMatcher: AnMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.an(anMatcher)) + infix def an[U](anMatcher: AnMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -626,7 +626,7 @@ $endif$ * ^ * */ - def theSameInstanceAs(anyRef: AnyRef): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.theSameInstanceAs(anyRef)) + infix def theSameInstanceAs(anyRef: AnyRef): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = and(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: @@ -636,7 +636,7 @@ $endif$ * ^ * */ - def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.definedAt(right)) + infix def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = and(MatcherWords.be.definedAt(right)) } /** @@ -647,7 +647,7 @@ $endif$ * ^ * */ - def and(beWord: BeWord): AndBeWord = new AndBeWord + infix 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 @@ -665,7 +665,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -675,7 +675,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -685,7 +685,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.fullyMatch.regex(regex)) } /** @@ -696,7 +696,7 @@ $endif$ * ^ * */ - def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord = new AndFullyMatchWord + infix 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 @@ -714,7 +714,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -724,7 +724,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -734,7 +734,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.include.regex(regex)) } /** @@ -745,7 +745,7 @@ $endif$ * ^ * */ - def and(includeWord: IncludeWord): AndIncludeWord = new AndIncludeWord + infix 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 @@ -763,7 +763,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -773,7 +773,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -783,7 +783,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.startWith.regex(regex)) } /** @@ -794,7 +794,7 @@ $endif$ * ^ * */ - def and(startWithWord: StartWithWord): AndStartWithWord = new AndStartWithWord + infix 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 @@ -812,7 +812,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -822,7 +822,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -832,7 +832,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = and(MatcherWords.endWith.regex(regex)) } /** @@ -843,7 +843,7 @@ $endif$ * ^ * */ - def and(endWithWord: EndWithWord): AndEndWithWord = new AndEndWithWord + infix 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 @@ -866,7 +866,7 @@ $endif$ * ^ * */ - def equal(any: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Equality] = + infix def equal(any: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Equality] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.equal(any))) /** @@ -877,7 +877,7 @@ $endif$ * ^ * */ - def equal[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.equal(spread)) + infix def equal[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.equal(spread)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -887,7 +887,7 @@ $endif$ * ^ * */ - def equal(o: Null): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = { + infix def equal(o: Null): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = { thisMatcherFactory and { new Matcher[SC] { def apply(left: SC): MatchResult = { @@ -914,7 +914,7 @@ $endif$ * ^ * */ - def be(any: Any): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = + infix def be(any: Any): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.be(any))) /** @@ -925,7 +925,7 @@ $endif$ * ^ * */ - def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = + infix def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** @@ -936,7 +936,7 @@ $endif$ * ^ * */ - def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = + infix def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** @@ -947,7 +947,7 @@ $endif$ * ^ * */ - def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = + infix def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** @@ -958,7 +958,7 @@ $endif$ * ^ * */ - def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** @@ -969,7 +969,7 @@ $endif$ * ^ * */ - def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanComparison)) /** @@ -980,7 +980,7 @@ $endif$ * ^ * */ - def be(o: Null): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(o)) + infix def be(o: Null): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(o)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -990,7 +990,7 @@ $endif$ * ^ * */ - def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanComparison)) /** @@ -1001,7 +1001,7 @@ $endif$ * ^ * */ - def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** @@ -1012,7 +1012,7 @@ $endif$ * ^ * */ - def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** @@ -1027,7 +1027,7 @@ $endif$ * cases still compile, but silently wouldn't work. *

*/ - def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = + infix def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(tripleEqualsInvocation)(pos)) // SKIP-SCALATESTJS,NATIVE-START @@ -1039,7 +1039,7 @@ $endif$ * ^ * */ - def be(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(symbol)) + infix def be(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -1050,7 +1050,7 @@ $endif$ * ^ * */ - def be[U](beMatcher: BeMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(beMatcher)) + infix def be[U](beMatcher: BeMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$, where directory is a BePropertyMatcher: @@ -1060,7 +1060,7 @@ $endif$ * ^ * */ - def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(bePropertyMatcher)) + infix def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(bePropertyMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -1071,7 +1071,7 @@ $endif$ * ^ * */ - def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -1082,7 +1082,7 @@ $endif$ * ^ * */ - def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$, where directory is a BePropertyMatcher: @@ -1092,7 +1092,7 @@ $endif$ * ^ * */ - def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAWordApplication)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -1103,7 +1103,7 @@ $endif$ * ^ * */ - def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -1114,7 +1114,7 @@ $endif$ * ^ * */ - def be[SC <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[SC]) = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[SC <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[SC]) = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$, where invalidMarks is a AnMatcher: @@ -1124,7 +1124,7 @@ $endif$ * ^ * */ - def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1134,7 +1134,7 @@ $endif$ * ^ * */ - inline def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = + inline infix def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = \${ MatcherFactory$arity$.andNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]('{thisAndNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#AndNotWord}, '{aType}) } 0 /** @@ -1145,7 +1145,7 @@ $endif$ * ^ * */ - inline def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = + inline infix def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = \${ MatcherFactory$arity$.andNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]('{thisAndNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#AndNotWord}, '{anType}) } /** @@ -1156,7 +1156,7 @@ $endif$ * ^ * */ - def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) + infix def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax, for the "primitive" numeric types: @@ -1166,7 +1166,7 @@ $endif$ * ^ * */ - def be[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(spread)) + infix def be[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(spread)) /** * This method enables the following syntax, where fraction is a PartialFunction: @@ -1176,7 +1176,7 @@ $endif$ * ^ * */ - def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.be(resultOfDefinedAt)) /** @@ -1187,7 +1187,7 @@ $endif$ * ^ * */ - def be(sortedWord: SortedWord) = + infix def be(sortedWord: SortedWord) = thisMatcherFactory.and(MatcherWords.not.be(sortedWord)) /** @@ -1198,7 +1198,7 @@ $endif$ * ^ * */ - def be(readableWord: ReadableWord) = + infix def be(readableWord: ReadableWord) = thisMatcherFactory.and(MatcherWords.not.be(readableWord)) /** @@ -1209,7 +1209,7 @@ $endif$ * ^ * */ - def be(writableWord: WritableWord) = + infix def be(writableWord: WritableWord) = thisMatcherFactory.and(MatcherWords.not.be(writableWord)) /** @@ -1220,7 +1220,7 @@ $endif$ * ^ * */ - def be(emptyWord: EmptyWord) = + infix def be(emptyWord: EmptyWord) = thisMatcherFactory.and(MatcherWords.not.be(emptyWord)) /** @@ -1231,7 +1231,7 @@ $endif$ * ^ * */ - def be(definedWord: DefinedWord) = + infix def be(definedWord: DefinedWord) = thisMatcherFactory.and(MatcherWords.not.be(definedWord)) /** @@ -1242,7 +1242,7 @@ $endif$ * ^ * */ - def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** @@ -1253,7 +1253,7 @@ $endif$ * ^ * */ - def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.include(resultOfRegexWordApplication)) /** @@ -1264,7 +1264,7 @@ $endif$ * ^ * */ - def include(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def include(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.include(expectedSubstring)) /** @@ -1275,7 +1275,7 @@ $endif$ * ^ * */ - def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** @@ -1286,7 +1286,7 @@ $endif$ * ^ * */ - def startWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def startWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.startWith(expectedSubstring)) /** @@ -1297,7 +1297,7 @@ $endif$ * ^ * */ - def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** @@ -1308,7 +1308,7 @@ $endif$ * ^ * */ - def endWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def endWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.and(MatcherWords.not.endWith(expectedSubstring)) /** @@ -1319,7 +1319,7 @@ $endif$ * ^ * */ - def contain[U](expectedElement: U): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain[U](expectedElement: U): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(expectedElement)) /** @@ -1330,7 +1330,7 @@ $endif$ * ^ * */ - def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = + infix def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.and(MatcherWords.not.contain(resultOfKeyWordApplication)) /** @@ -1341,7 +1341,7 @@ $endif$ * ^ * */ - def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = + infix def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = thisMatcherFactory.and(MatcherWords.not.contain(resultOfValueWordApplication)) /** @@ -1352,7 +1352,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1363,7 +1363,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1374,7 +1374,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1385,7 +1385,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1396,7 +1396,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfNoneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfNoneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1407,7 +1407,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfNoElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfNoElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1418,7 +1418,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1429,7 +1429,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1440,7 +1440,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1451,7 +1451,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1462,7 +1462,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAllOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAllOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1473,7 +1473,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAllElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAllElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1484,7 +1484,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1495,7 +1495,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1506,7 +1506,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1517,7 +1517,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.and(MatcherWords.not.contain(right)) /** @@ -1528,7 +1528,7 @@ $endif$ * ^ * */ - inline def matchPattern(inline right: PartialFunction[Any, _]) = + inline infix def matchPattern(inline right: PartialFunction[Any, _]) = \${ MatcherFactory$arity$.andNotMatchPattern('{thisAndNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#AndNotWord}, '{right}) } } """ @@ -1543,7 +1543,7 @@ $endif$ * ^ * */ - def and(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): AndNotWord = new AndNotWord(prettifier, pos) + infix def and(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): AndNotWord = new AndNotWord(prettifier, pos) /** * This method enables the following syntax: @@ -1553,7 +1553,7 @@ $endif$ * ^ * */ - def and(existWord: ExistWord): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = + infix def and(existWord: ExistWord): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = thisMatcherFactory.and(MatcherWords.exist.matcherFactory) /** @@ -1564,7 +1564,7 @@ $endif$ * ^ * */ - def and(notExist: ResultOfNotExist): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = + infix def and(notExist: ResultOfNotExist): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = thisMatcherFactory.and(MatcherWords.not.exist) /** @@ -1583,7 +1583,7 @@ $endif$ * ^ * */ - def length(expectedLength: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = or(MatcherWords.have.length(expectedLength)) + infix def length(expectedLength: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = or(MatcherWords.have.length(expectedLength)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1593,7 +1593,7 @@ $endif$ * ^ * */ - def size(expectedSize: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = or(MatcherWords.have.size(expectedSize)) + infix def size(expectedSize: Long): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = or(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1603,7 +1603,7 @@ $endif$ * ^ * */ - def message(expectedMessage: String): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = or(MatcherWords.have.message(expectedMessage)) + infix def message(expectedMessage: String): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = or(MatcherWords.have.message(expectedMessage)) } /** @@ -1614,7 +1614,7 @@ $endif$ * ^ * */ - def or(haveWord: HaveWord): OrHaveWord = new OrHaveWord + infix 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 @@ -1642,7 +1642,7 @@ $endif$ * ^ * */ - def key(expectedKey: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.or(MatcherWords.contain.key(expectedKey)) + infix def key(expectedKey: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.or(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1652,7 +1652,7 @@ $endif$ * ^ * */ - def value(expectedValue: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = thisMatcherFactory.or(MatcherWords.contain.value(expectedValue)) + infix def value(expectedValue: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = thisMatcherFactory.or(MatcherWords.contain.value(expectedValue)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1662,7 +1662,7 @@ $endif$ * ^ * */ - def theSameElementsAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def theSameElementsAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.theSameElementsAs(right)) /** @@ -1673,7 +1673,7 @@ $endif$ * ^ * */ - def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.theSameElementsInOrderAs(right)) /** @@ -1684,7 +1684,7 @@ $endif$ * ^ * */ - def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1695,7 +1695,7 @@ $endif$ * ^ * */ - def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1706,7 +1706,7 @@ $endif$ * ^ * */ - def allElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def allElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.allElementsOf(elements)) /** @@ -1717,7 +1717,7 @@ $endif$ * ^ * */ - def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1728,7 +1728,7 @@ $endif$ * ^ * */ - def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.contain.inOrderElementsOf(elements)) /** @@ -1739,7 +1739,7 @@ $endif$ * ^ * */ - def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1750,7 +1750,7 @@ $endif$ * ^ * */ - def oneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def oneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.contain.oneElementOf(elements)) /** @@ -1761,7 +1761,7 @@ $endif$ * ^ * */ - def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1772,7 +1772,7 @@ $endif$ * ^ * */ - def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atLeastOneElementOf(elements)) /** @@ -1783,7 +1783,7 @@ $endif$ * ^ * */ - def only(right: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def only(right: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** @@ -1794,7 +1794,7 @@ $endif$ * ^ * */ - def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1805,7 +1805,7 @@ $endif$ * ^ * */ - def noElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def noElementsOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.contain.noElementsOf(elements)) /** @@ -1816,7 +1816,7 @@ $endif$ * ^ * */ - def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -1827,7 +1827,7 @@ $endif$ * ^ * */ - def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.contain.atMostOneElementOf(elements)) } @@ -1839,7 +1839,7 @@ $endif$ * ^ * */ - def or(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): OrContainWord = new OrContainWord(prettifier, pos) + infix 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 @@ -1858,7 +1858,7 @@ $endif$ * ^ * */ - def a(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.a(symbol)) + infix def a(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.a(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -1869,7 +1869,7 @@ $endif$ * ^ * */ - def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = or(MatcherWords.be.a(bePropertyMatcher)) + infix def a[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = or(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1879,7 +1879,7 @@ $endif$ * ^ * */ - def a[U](aMatcher: AMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.a(aMatcher)) + infix def a[U](aMatcher: AMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.a(aMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -1890,7 +1890,7 @@ $endif$ * ^ * */ - def an(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.an(symbol)) + infix def an(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.an(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -1901,7 +1901,7 @@ $endif$ * ^ * */ - def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = or(MatcherWords.be.an(bePropertyMatcher)) + infix def an[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = or(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$, where integerNumber is a AnMatcher: @@ -1911,7 +1911,7 @@ $endif$ * ^ * */ - def an[U](anMatcher: AnMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.an(anMatcher)) + infix def an[U](anMatcher: AnMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1921,7 +1921,7 @@ $endif$ * ^ * */ - def theSameInstanceAs(anyRef: AnyRef): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.theSameInstanceAs(anyRef)) + infix def theSameInstanceAs(anyRef: AnyRef): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = or(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: @@ -1931,7 +1931,7 @@ $endif$ * ^ * */ - def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.definedAt(right)) + infix def definedAt[A, U <: PartialFunction[A, _]](right: A): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = or(MatcherWords.be.definedAt(right)) } /** @@ -1942,7 +1942,7 @@ $endif$ * ^ * */ - def or(beWord: BeWord): OrBeWord = new OrBeWord + infix 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 @@ -1960,7 +1960,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1970,7 +1970,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -1980,7 +1980,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.fullyMatch.regex(regex)) } /** @@ -1991,7 +1991,7 @@ $endif$ * ^ * */ - def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord = new OrFullyMatchWord + infix 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 @@ -2009,7 +2009,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2019,7 +2019,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2029,7 +2029,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.include.regex(regex)) } /** @@ -2040,7 +2040,7 @@ $endif$ * ^ * */ - def or(includeWord: IncludeWord): OrIncludeWord = new OrIncludeWord + infix 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 @@ -2058,7 +2058,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2068,7 +2068,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2078,7 +2078,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.startWith.regex(regex)) } /** @@ -2089,7 +2089,7 @@ $endif$ * ^ * */ - def or(startWithWord: StartWithWord): OrStartWithWord = new OrStartWithWord + infix 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 @@ -2107,7 +2107,7 @@ $endif$ * ^ * */ - def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regexString)) + infix def regex(regexString: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2117,7 +2117,7 @@ $endif$ * ^ * */ - def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2127,7 +2127,7 @@ $endif$ * ^ * */ - def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regex)) + infix def regex(regex: Regex): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = or(MatcherWords.endWith.regex(regex)) } /** @@ -2138,7 +2138,7 @@ $endif$ * ^ * */ - def or(endWithWord: EndWithWord): OrEndWithWord = new OrEndWithWord + infix 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 @@ -2161,7 +2161,7 @@ $endif$ * ^ * */ - def equal(any: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Equality] = + infix def equal(any: Any): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Equality] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.equal(any))) /** @@ -2172,7 +2172,7 @@ $endif$ * ^ * */ - def equal[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.equal(spread)) + infix def equal[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.equal(spread)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2182,7 +2182,7 @@ $endif$ * ^ * */ - def equal(o: Null): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = { + infix def equal(o: Null): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = { thisMatcherFactory or { new Matcher[SC] { def apply(left: SC): MatchResult = { @@ -2209,7 +2209,7 @@ $endif$ * ^ * */ - def be(any: Any): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = + infix def be(any: Any): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.be(any))) /** @@ -2220,7 +2220,7 @@ $endif$ * ^ * */ - def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = + infix def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Length] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** @@ -2231,7 +2231,7 @@ $endif$ * ^ * */ - def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = + infix def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Size] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** @@ -2242,7 +2242,7 @@ $endif$ * ^ * */ - def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = + infix def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Messaging] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** @@ -2253,7 +2253,7 @@ $endif$ * ^ * */ - def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** @@ -2264,7 +2264,7 @@ $endif$ * ^ * */ - def be(o: Null): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(o)) + infix def be(o: Null): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(o)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2274,7 +2274,7 @@ $endif$ * ^ * */ - def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanComparison)) /** @@ -2285,7 +2285,7 @@ $endif$ * ^ * */ - def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanComparison)) /** @@ -2296,7 +2296,7 @@ $endif$ * ^ * */ - def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** @@ -2307,7 +2307,7 @@ $endif$ * ^ * */ - def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** @@ -2322,7 +2322,7 @@ $endif$ * cases still compile, but silently wouldn't work. *

*/ - def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = + infix def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): MatcherFactory$arity$[SC, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(tripleEqualsInvocation)(pos)) // SKIP-SCALATESTJS,NATIVE-START @@ -2334,7 +2334,7 @@ $endif$ * ^ * */ - def be(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(symbol)) + infix def be(symbol: Symbol): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -2345,7 +2345,7 @@ $endif$ * ^ * */ - def be[U](beMatcher: BeMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(beMatcher)) + infix def be[U](beMatcher: BeMatcher[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax given a MatcherFactory$arity$, where file is a BePropertyMatcher: @@ -2355,7 +2355,7 @@ $endif$ * ^ * */ - def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(bePropertyMatcher)) + infix def be[U](bePropertyMatcher: BePropertyMatcher[U]): MatcherFactory$arity$[SC with AnyRef with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(bePropertyMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -2366,7 +2366,7 @@ $endif$ * ^ * */ - def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -2377,7 +2377,7 @@ $endif$ * ^ * */ - def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$, where file is a BePropertyMatcher: @@ -2387,7 +2387,7 @@ $endif$ * ^ * */ - def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAWordApplication)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -2398,7 +2398,7 @@ $endif$ * ^ * */ - def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -2409,7 +2409,7 @@ $endif$ * ^ * */ - def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$, where invalidMarks is an AnMatcher: @@ -2419,7 +2419,7 @@ $endif$ * ^ * */ - def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax given a MatcherFactory$arity$: @@ -2429,7 +2429,7 @@ $endif$ * ^ * */ - inline def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = + inline infix def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = \${ MatcherFactory$arity$.orNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]('{thisOrNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#OrNotWord}, '{aType}) } /** @@ -2440,7 +2440,7 @@ $endif$ * ^ * */ - inline def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = + inline infix def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = \${ MatcherFactory$arity$.orNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]('{thisOrNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#OrNotWord}, '{anType}) } /** @@ -2451,7 +2451,7 @@ $endif$ * ^ * */ - def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) + infix def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax for the "primitive" numeric types: @@ -2461,7 +2461,7 @@ $endif$ * ^ * */ - def be[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(spread)) + infix def be[U](spread: Spread[U]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(spread)) /** * This method enables the following syntax, where fraction is a PartialFunction: @@ -2471,7 +2471,7 @@ $endif$ * ^ * */ - def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = + infix def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): MatcherFactory$arity$[SC with U, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.be(resultOfDefinedAt)) /** @@ -2482,7 +2482,7 @@ $endif$ * ^ * */ - def be(sortedWord: SortedWord) = + infix def be(sortedWord: SortedWord) = thisMatcherFactory.or(MatcherWords.not.be(sortedWord)) /** @@ -2493,7 +2493,7 @@ $endif$ * ^ * */ - def be(readableWord: ReadableWord) = + infix def be(readableWord: ReadableWord) = thisMatcherFactory.or(MatcherWords.not.be(readableWord)) /** @@ -2504,7 +2504,7 @@ $endif$ * ^ * */ - def be(writableWord: WritableWord) = + infix def be(writableWord: WritableWord) = thisMatcherFactory.or(MatcherWords.not.be(writableWord)) /** @@ -2515,7 +2515,7 @@ $endif$ * ^ * */ - def be(emptyWord: EmptyWord) = + infix def be(emptyWord: EmptyWord) = thisMatcherFactory.or(MatcherWords.not.be(emptyWord)) /** @@ -2526,7 +2526,7 @@ $endif$ * ^ * */ - def be(definedWord: DefinedWord) = + infix def be(definedWord: DefinedWord) = thisMatcherFactory.or(MatcherWords.not.be(definedWord)) /** @@ -2537,7 +2537,7 @@ $endif$ * ^ * */ - def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** @@ -2548,7 +2548,7 @@ $endif$ * ^ * */ - def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.include(resultOfRegexWordApplication)) /** @@ -2559,7 +2559,7 @@ $endif$ * ^ * */ - def include(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def include(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.include(expectedSubstring)) /** @@ -2570,7 +2570,7 @@ $endif$ * ^ * */ - def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** @@ -2581,7 +2581,7 @@ $endif$ * ^ * */ - def startWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def startWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.startWith(expectedSubstring)) /** @@ -2592,7 +2592,7 @@ $endif$ * ^ * */ - def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** @@ -2603,7 +2603,7 @@ $endif$ * ^ * */ - def endWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = + infix def endWith(expectedSubstring: String): MatcherFactory$arity$[SC with String, $commaSeparatedTCNs$] = thisMatcherFactory.or(MatcherWords.not.endWith(expectedSubstring)) /** @@ -2614,7 +2614,7 @@ $endif$ * ^ * */ - def contain[U](expectedElement: U): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain[U](expectedElement: U): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(expectedElement)) /** @@ -2625,7 +2625,7 @@ $endif$ * ^ * */ - def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = + infix def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, KeyMapping] = thisMatcherFactory.or(MatcherWords.not.contain(resultOfKeyWordApplication)) /** @@ -2636,7 +2636,7 @@ $endif$ * ^ * */ - def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = + infix def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, ValueMapping] = thisMatcherFactory.or(MatcherWords.not.contain(resultOfValueWordApplication)) /** @@ -2647,7 +2647,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2658,7 +2658,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2669,7 +2669,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2680,7 +2680,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2691,7 +2691,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfNoneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfNoneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2702,7 +2702,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfNoElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = + infix def contain(right: ResultOfNoElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Containing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2713,7 +2713,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2724,7 +2724,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2735,7 +2735,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2746,7 +2746,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2757,7 +2757,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAllOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAllOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2768,7 +2768,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAllElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAllElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2779,7 +2779,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2790,7 +2790,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = + infix def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Sequencing] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2801,7 +2801,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2812,7 +2812,7 @@ $endif$ * ^ * */ - def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = + infix def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Aggregating] = thisMatcherFactory.or(MatcherWords.not.contain(right)) /** @@ -2823,7 +2823,7 @@ $endif$ * ^ * */ - inline def matchPattern(inline right: PartialFunction[Any, _]) = + inline infix def matchPattern(inline right: PartialFunction[Any, _]) = \${ MatcherFactory$arity$.orNotMatchPattern('{thisOrNotWord: MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]#OrNotWord}, '{right}) } } @@ -2835,7 +2835,7 @@ $endif$ * ^ * */ - def or(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): OrNotWord = new OrNotWord(prettifier, pos) + infix def or(notWord: NotWord)(implicit prettifier: Prettifier, pos: source.Position): OrNotWord = new OrNotWord(prettifier, pos) /** * This method enables the following syntax: @@ -2845,7 +2845,7 @@ $endif$ * ^ * */ - def or(existWord: ExistWord): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = + infix def or(existWord: ExistWord): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = thisMatcherFactory.or(MatcherWords.exist.matcherFactory) /** @@ -2856,7 +2856,7 @@ $endif$ * ^ * */ - def or(notExist: ResultOfNotExist): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = + infix def or(notExist: ResultOfNotExist): MatcherFactory$arityPlusOne$[SC, $commaSeparatedTCNs$, Existence] = thisMatcherFactory.or(MatcherWords.not.exist) } From 10c89bc25b4f7b677bbca68cc311c96989416660 Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sat, 8 Oct 2022 23:28:24 +0800 Subject: [PATCH 6/7] Added infix modifier to functions in Matcher.scala. --- .../org/scalatest/matchers/Matcher.scala | 452 +++++++++--------- 1 file changed, 226 insertions(+), 226 deletions(-) diff --git a/dotty/matchers-core/src/main/scala/org/scalatest/matchers/Matcher.scala b/dotty/matchers-core/src/main/scala/org/scalatest/matchers/Matcher.scala index a52aa81bf9..0901b3ca97 100644 --- a/dotty/matchers-core/src/main/scala/org/scalatest/matchers/Matcher.scala +++ b/dotty/matchers-core/src/main/scala/org/scalatest/matchers/Matcher.scala @@ -516,7 +516,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * @param the matcher to logical-and with this matcher * @return a matcher that performs the logical-and of this and the passed matcher */ - def and[U <: T](rightMatcher: Matcher[U]): Matcher[U] = + infix def and[U <: T](rightMatcher: Matcher[U]): Matcher[U] = new Matcher[U] { def apply(left: U): MatchResult = { andMatchersAndApply(left, outerInstance, rightMatcher) @@ -534,7 +534,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * @param rightMatcherFactory1 the MatcherFactory to logical-and with this MatcherFactory * @return a MatcherFactory that performs the logical-and of this and the passed MatcherFactory */ - def and[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[T with U, TC1] = + infix def and[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[T with U, TC1] = new MatcherFactory1[T with U, TC1] { def matcher[V <: T with U : TC1]: Matcher[V] = { new Matcher[V] { @@ -570,7 +570,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * @param rightMatcher the matcher to logical-or with this matcher * @return a matcher that performs the logical-or of this and the passed matcher */ - def or[U <: T](rightMatcher: Matcher[U]): Matcher[U] = + infix def or[U <: T](rightMatcher: Matcher[U]): Matcher[U] = new Matcher[U] { def apply(left: U): MatchResult = { orMatchersAndApply(left, outerInstance, rightMatcher) @@ -586,7 +586,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * @param rightMatcherFactory1 the MatcherFactory to logical-or with this MatcherFactory * @return a MatcherFactory that performs the logical-or of this and the passed MatcherFactory */ - def or[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[T with U, TC1] = + infix def or[U, TC1[_]](rightMatcherFactory1: MatcherFactory1[U, TC1]): MatcherFactory1[T with U, TC1] = new MatcherFactory1[T with U, TC1] { def matcher[V <: T with U : TC1]: Matcher[V] = { new Matcher[V] { @@ -616,7 +616,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def length(expectedLength: Long): MatcherFactory1[T, Length] = and(MatcherWords.have.length(expectedLength)) + infix def length(expectedLength: Long): MatcherFactory1[T, Length] = and(MatcherWords.have.length(expectedLength)) /** * This method enables the following syntax: @@ -626,7 +626,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def size(expectedSize: Long): MatcherFactory1[T, Size] = and(MatcherWords.have.size(expectedSize)) + infix def size(expectedSize: Long): MatcherFactory1[T, Size] = and(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax: @@ -636,7 +636,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def message(expectedMessage: String): MatcherFactory1[T, Messaging] = and(MatcherWords.have.message(expectedMessage)) + infix def message(expectedMessage: String): MatcherFactory1[T, Messaging] = and(MatcherWords.have.message(expectedMessage)) } /** @@ -647,7 +647,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(haveWord: HaveWord): AndHaveWord = new AndHaveWord + infix 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 @@ -675,7 +675,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def key(expectedKey: Any): MatcherFactory1[T, KeyMapping] = outerInstance.and(MatcherWords.contain.key(expectedKey)) + infix def key(expectedKey: Any): MatcherFactory1[T, KeyMapping] = outerInstance.and(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax: @@ -685,7 +685,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def value(expectedValue: Any): MatcherFactory1[T, ValueMapping] = outerInstance.and(MatcherWords.contain.value(expectedValue)) + infix def value(expectedValue: Any): MatcherFactory1[T, ValueMapping] = outerInstance.and(MatcherWords.contain.value(expectedValue)) /** * This method enables the following syntax: @@ -695,7 +695,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameElementsAs(right: GenTraversable[_]): MatcherFactory1[T, Aggregating] = + infix def theSameElementsAs(right: GenTraversable[_]): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.theSameElementsAs(right)) /** @@ -706,7 +706,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory1[T, Sequencing] = + infix def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.contain.theSameElementsInOrderAs(right)) /** @@ -717,7 +717,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = + infix def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -728,7 +728,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -739,7 +739,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def allElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def allElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.allElementsOf(elements)) /** @@ -750,7 +750,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = + infix def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -761,7 +761,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Sequencing] = + infix def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.contain.inOrderElementsOf(elements)) /** @@ -772,7 +772,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = + infix def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -783,7 +783,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def oneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = + infix def oneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.contain.oneElementOf(elements)) /** @@ -794,7 +794,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -805,7 +805,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.atLeastOneElementOf(elements)) /** @@ -816,7 +816,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def only(right: Any*): MatcherFactory1[T, Aggregating] = + infix def only(right: Any*): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** @@ -827,7 +827,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = + infix def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -838,7 +838,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def noElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = + infix def noElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.contain.noElementsOf(elements)) /** @@ -849,7 +849,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -860,7 +860,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.contain.atMostOneElementOf(elements)) } @@ -872,7 +872,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): AndContainWord = new AndContainWord(prettifier, pos) + infix 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 @@ -891,7 +891,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a(symbol: Symbol): Matcher[T with AnyRef] = and(MatcherWords.be.a(symbol)) + infix def a(symbol: Symbol): Matcher[T with AnyRef] = and(MatcherWords.be.a(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -902,7 +902,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = and(MatcherWords.be.a(bePropertyMatcher)) + infix def a[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = and(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax, where positiveNumber and validNumber are AMatcher: @@ -912,7 +912,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a[U](aMatcher: AMatcher[U]): Matcher[T with U] = and(MatcherWords.be.a(aMatcher)) + infix def a[U](aMatcher: AMatcher[U]): Matcher[T with U] = and(MatcherWords.be.a(aMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -923,7 +923,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an(symbol: Symbol): Matcher[T with AnyRef] = and(MatcherWords.be.an(symbol)) + infix def an(symbol: Symbol): Matcher[T with AnyRef] = and(MatcherWords.be.an(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -934,7 +934,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = and(MatcherWords.be.an(bePropertyMatcher)) + infix def an[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = and(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax, where integerNumber is an AnMatcher: @@ -944,7 +944,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an[U](anMatcher: AnMatcher[U]): Matcher[T with U] = and(MatcherWords.be.an(anMatcher)) + infix def an[U](anMatcher: AnMatcher[U]): Matcher[T with U] = and(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax: @@ -954,7 +954,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameInstanceAs(anyRef: AnyRef): Matcher[T with AnyRef] = and(MatcherWords.be.theSameInstanceAs(anyRef)) + infix def theSameInstanceAs(anyRef: AnyRef): Matcher[T with AnyRef] = and(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: @@ -964,7 +964,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[T with U] = and(MatcherWords.be.definedAt(right)) + infix def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[T with U] = and(MatcherWords.be.definedAt(right)) } /** @@ -975,7 +975,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(beWord: BeWord): AndBeWord = new AndBeWord + infix 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 @@ -993,7 +993,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax: @@ -1003,7 +1003,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -1013,7 +1013,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.fullyMatch.regex(regex)) } /** @@ -1024,7 +1024,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(fullyMatchWord: FullyMatchWord): AndFullyMatchWord = new AndFullyMatchWord + infix 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 @@ -1042,7 +1042,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = and(MatcherWords.include.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = and(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax: @@ -1052,7 +1052,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.include.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -1062,7 +1062,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.include.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.include.regex(regex)) } /** @@ -1073,7 +1073,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(includeWord: IncludeWord): AndIncludeWord = new AndIncludeWord + infix 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 @@ -1091,7 +1091,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = and(MatcherWords.startWith.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = and(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax: @@ -1101,7 +1101,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.startWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -1111,7 +1111,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.startWith.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.startWith.regex(regex)) } /** @@ -1122,7 +1122,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(startWithWord: StartWithWord): AndStartWithWord = new AndStartWithWord + infix 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 @@ -1140,7 +1140,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = and(MatcherWords.endWith.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = and(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax: @@ -1150,7 +1150,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.endWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = and(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -1160,7 +1160,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.endWith.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = and(MatcherWords.endWith.regex(regex)) } /** @@ -1171,7 +1171,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(endWithWord: EndWithWord): AndEndWithWord = new AndEndWithWord + infix 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 @@ -1194,7 +1194,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal(any: Any): MatcherFactory1[T, Equality] = + infix def equal(any: Any): MatcherFactory1[T, Equality] = outerInstance.and(MatcherWords.not.apply(MatcherWords.equal(any))) /** @@ -1205,7 +1205,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal[U](spread: Spread[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.equal(spread)) + infix def equal[U](spread: Spread[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.equal(spread)) /** * This method enables the following syntax: @@ -1215,7 +1215,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal(o: Null): Matcher[T] = { + infix def equal(o: Null): Matcher[T] = { outerInstance and { new Matcher[T] { def apply(left: T): MatchResult = { @@ -1242,7 +1242,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(any: Any): Matcher[T] = + infix def be(any: Any): Matcher[T] = outerInstance.and(MatcherWords.not.apply(MatcherWords.be(any))) /** @@ -1253,7 +1253,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory1[T, Length] = + infix def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory1[T, Length] = outerInstance.and(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** @@ -1264,7 +1264,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory1[T, Size] = + infix def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory1[T, Size] = outerInstance.and(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** @@ -1275,7 +1275,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory1[T, Messaging] = + infix def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory1[T, Messaging] = outerInstance.and(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** @@ -1286,7 +1286,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): Matcher[T with U] = + infix def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): Matcher[T with U] = outerInstance.and(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** @@ -1297,7 +1297,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): Matcher[T with U] = + infix def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfLessThanComparison)) /** @@ -1308,7 +1308,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(o: Null): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(o)) + infix def be(o: Null): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(o)) /** * This method enables the following syntax: @@ -1318,7 +1318,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): Matcher[T with U] = + infix def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfGreaterThanComparison)) /** @@ -1329,7 +1329,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): Matcher[T with U] = + infix def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** @@ -1340,7 +1340,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): Matcher[T with U] = + infix def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** @@ -1351,7 +1351,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): Matcher[T] = + infix def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): Matcher[T] = outerInstance.and(MatcherWords.not.be(tripleEqualsInvocation)) /** @@ -1362,7 +1362,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(symbol: Symbol): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(symbol)) + infix def be(symbol: Symbol): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(symbol)) /** * This method enables the following syntax, where odd is a BeMatcher: @@ -1372,7 +1372,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](beMatcher: BeMatcher[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(beMatcher)) + infix def be[U](beMatcher: BeMatcher[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax, where directory is a BePropertyMatcher: @@ -1382,7 +1382,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = outerInstance.and(MatcherWords.not.be(bePropertyMatcher)) + infix def be[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = outerInstance.and(MatcherWords.not.be(bePropertyMatcher)) /** * This method enables the following syntax: @@ -1392,7 +1392,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax, where validMarks is an AMatcher: @@ -1402,7 +1402,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax, where directory is a BePropertyMatcher: @@ -1412,7 +1412,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax: @@ -1422,7 +1422,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax, where directory is a BePropertyMatcher: @@ -1432,7 +1432,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[T <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[T]) = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[T <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[T]) = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax, where invalidMarks is an AnMatcher: @@ -1442,7 +1442,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfAnWordApplication)) import language.experimental.macros @@ -1454,7 +1454,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def be(aType: ResultOfATypeInvocation[_]): Matcher[T] = + inline infix def be(aType: ResultOfATypeInvocation[_]): Matcher[T] = ${ TypeMatcherMacro.andNotATypeMatcher('{thisAndNotWord: Matcher[T]#AndNotWord}, '{aType}) } /** @@ -1465,7 +1465,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def be(anType: ResultOfAnTypeInvocation[_]): Matcher[T] = + inline infix def be(anType: ResultOfAnTypeInvocation[_]): Matcher[T] = ${ TypeMatcherMacro.andNotAnTypeMatcher('{thisAndNotWord: Matcher[T]#AndNotWord}, '{anType}) } /** @@ -1476,7 +1476,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) + infix def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): Matcher[T with AnyRef] = outerInstance.and(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax, for the "primitive" numeric types: @@ -1486,7 +1486,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](spread: Spread[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(spread)) + infix def be[U](spread: Spread[U]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(spread)) /** * This method enables the following syntax: @@ -1496,7 +1496,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): Matcher[T with U] = + infix def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): Matcher[T with U] = outerInstance.and(MatcherWords.not.be(resultOfDefinedAt)) /** @@ -1507,7 +1507,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(sortedWord: SortedWord) = + infix def be(sortedWord: SortedWord) = outerInstance.and(MatcherWords.not.be(sortedWord)) /** @@ -1518,7 +1518,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(readableWord: ReadableWord) = + infix def be(readableWord: ReadableWord) = outerInstance.and(MatcherWords.not.be(readableWord)) /** @@ -1529,7 +1529,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(writableWord: WritableWord) = + infix def be(writableWord: WritableWord) = outerInstance.and(MatcherWords.not.be(writableWord)) /** @@ -1540,7 +1540,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(emptyWord: EmptyWord) = + infix def be(emptyWord: EmptyWord) = outerInstance.and(MatcherWords.not.be(emptyWord)) /** @@ -1551,7 +1551,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(definedWord: DefinedWord) = + infix def be(definedWord: DefinedWord) = outerInstance.and(MatcherWords.not.be(definedWord)) /** @@ -1562,7 +1562,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.and(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** @@ -1573,7 +1573,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.and(MatcherWords.not.include(resultOfRegexWordApplication)) /** @@ -1584,7 +1584,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def include(expectedSubstring: String): Matcher[T with String] = + infix def include(expectedSubstring: String): Matcher[T with String] = outerInstance.and(MatcherWords.not.include(expectedSubstring)) /** @@ -1595,7 +1595,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.and(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** @@ -1606,7 +1606,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def startWith(expectedSubstring: String): Matcher[T with String] = + infix def startWith(expectedSubstring: String): Matcher[T with String] = outerInstance.and(MatcherWords.not.startWith(expectedSubstring)) /** @@ -1617,7 +1617,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.and(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** @@ -1628,7 +1628,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def endWith(expectedSubstring: String): Matcher[T with String] = + infix def endWith(expectedSubstring: String): Matcher[T with String] = outerInstance.and(MatcherWords.not.endWith(expectedSubstring)) /** @@ -1639,7 +1639,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain[U](expectedElement: U): MatcherFactory1[T, Containing] = + infix def contain[U](expectedElement: U): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.not.contain(expectedElement)) /** @@ -1650,7 +1650,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOneOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfOneOfApplication): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1661,7 +1661,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOneElementOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfOneElementOfApplication): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1672,7 +1672,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1683,7 +1683,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1694,7 +1694,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfNoneOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfNoneOfApplication): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1705,7 +1705,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfNoElementsOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfNoElementsOfApplication): MatcherFactory1[T, Containing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1716,7 +1716,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1727,7 +1727,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1738,7 +1738,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOnlyApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfOnlyApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1749,7 +1749,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1760,7 +1760,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAllOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAllOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1771,7 +1771,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAllElementsOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAllElementsOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1782,7 +1782,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderApplication): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1793,7 +1793,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory1[T, Sequencing] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1804,7 +1804,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) /** @@ -1815,7 +1815,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.and(MatcherWords.not.contain(right)) // TODO: Write tests and impl for contain ResultOfKey/ValueWordApplication @@ -1827,7 +1827,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory1[T, KeyMapping] = + infix def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory1[T, KeyMapping] = outerInstance.and(MatcherWords.not.contain(resultOfKeyWordApplication)) /** @@ -1838,7 +1838,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory1[T, ValueMapping] = + infix def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory1[T, ValueMapping] = outerInstance.and(MatcherWords.not.contain(resultOfValueWordApplication)) /** @@ -1849,7 +1849,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def matchPattern(inline right: PartialFunction[Any, _]) = + inline infix def matchPattern(inline right: PartialFunction[Any, _]) = ${ MatchPatternMacro.andNotMatchPatternMatcher('{thisAndNotWord: Matcher[T]#AndNotWord}, '{right}) } } @@ -1861,7 +1861,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(notWord: NotWord): AndNotWord = new AndNotWord + infix def and(notWord: NotWord): AndNotWord = new AndNotWord /** * This method enables the following syntax: @@ -1871,7 +1871,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(existWord: ExistWord): MatcherFactory1[T, Existence] = + infix def and(existWord: ExistWord): MatcherFactory1[T, Existence] = outerInstance.and(MatcherWords.exist.matcherFactory) /** @@ -1882,7 +1882,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def and(notExist: ResultOfNotExist): MatcherFactory1[T, Existence] = + infix def and(notExist: ResultOfNotExist): MatcherFactory1[T, Existence] = outerInstance.and(MatcherWords.not.exist) /** @@ -1901,7 +1901,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def length(expectedLength: Long): MatcherFactory1[T, Length] = or(MatcherWords.have.length(expectedLength)) + infix def length(expectedLength: Long): MatcherFactory1[T, Length] = or(MatcherWords.have.length(expectedLength)) /** * This method enables the following syntax: @@ -1911,7 +1911,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def size(expectedSize: Long): MatcherFactory1[T, Size] = or(MatcherWords.have.size(expectedSize)) + infix def size(expectedSize: Long): MatcherFactory1[T, Size] = or(MatcherWords.have.size(expectedSize)) /** * This method enables the following syntax: @@ -1921,7 +1921,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def message(expectedMessage: String): MatcherFactory1[T, Messaging] = or(MatcherWords.have.message(expectedMessage)) + infix def message(expectedMessage: String): MatcherFactory1[T, Messaging] = or(MatcherWords.have.message(expectedMessage)) } /** @@ -1932,7 +1932,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(haveWord: HaveWord): OrHaveWord = new OrHaveWord + infix 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 @@ -1960,7 +1960,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def key(expectedKey: Any): MatcherFactory1[T, KeyMapping] = outerInstance.or(MatcherWords.contain.key(expectedKey)) + infix def key(expectedKey: Any): MatcherFactory1[T, KeyMapping] = outerInstance.or(MatcherWords.contain.key(expectedKey)) /** * This method enables the following syntax: @@ -1970,7 +1970,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def value(expectedValue: Any): MatcherFactory1[T, ValueMapping] = outerInstance.or(MatcherWords.contain.value(expectedValue)) + infix def value(expectedValue: Any): MatcherFactory1[T, ValueMapping] = outerInstance.or(MatcherWords.contain.value(expectedValue)) /** * This method enables the following syntax: @@ -1980,7 +1980,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameElementsAs(right: GenTraversable[_]): MatcherFactory1[T, Aggregating] = + infix def theSameElementsAs(right: GenTraversable[_]): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.theSameElementsAs(right)) /** @@ -1991,7 +1991,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory1[T, Sequencing] = + infix def theSameElementsInOrderAs(right: GenTraversable[_]): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.contain.theSameElementsInOrderAs(right)) /** @@ -2002,7 +2002,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.allOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2013,7 +2013,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def allElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def allElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.allElementsOf(elements)) /** @@ -2024,7 +2024,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = + infix def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.contain.inOrder(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2035,7 +2035,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Sequencing] = + infix def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.contain.inOrderElementsOf(elements)) /** @@ -2046,7 +2046,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = + infix def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.contain.oneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2057,7 +2057,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def oneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = + infix def oneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.contain.oneElementOf(elements)) /** @@ -2068,7 +2068,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.atLeastOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2079,7 +2079,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.atLeastOneElementOf(elements)) /** @@ -2090,7 +2090,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def only(right: Any*): MatcherFactory1[T, Aggregating] = + infix def only(right: Any*): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.only(right.toList: _*)(prettifier, pos)) /** @@ -2101,7 +2101,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = + infix def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.contain.inOrderOnly(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2112,7 +2112,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = + infix def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.contain.noneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2123,7 +2123,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def noElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = + infix def noElementsOf(elements: GenTraversable[Any]): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.contain.noElementsOf(elements)) /** @@ -2134,7 +2134,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = + infix def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.atMostOneOf(firstEle, secondEle, remainingEles.toList: _*)(prettifier, pos)) /** @@ -2145,7 +2145,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = + infix def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.contain.atMostOneElementOf(elements)) } @@ -2157,7 +2157,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(containWord: ContainWord)(implicit prettifier: Prettifier, pos: source.Position): OrContainWord = new OrContainWord(prettifier, pos) + infix 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 @@ -2176,7 +2176,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a(symbol: Symbol): Matcher[T with AnyRef] = or(MatcherWords.be.a(symbol)) + infix def a(symbol: Symbol): Matcher[T with AnyRef] = or(MatcherWords.be.a(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -2187,7 +2187,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = or(MatcherWords.be.a(bePropertyMatcher)) + infix def a[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = or(MatcherWords.be.a(bePropertyMatcher)) /** * This method enables the following syntax, where positiveNumber and validNumber are AMatcher: @@ -2197,7 +2197,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def a[U](aMatcher: AMatcher[U]): Matcher[T with U] = or(MatcherWords.be.a(aMatcher)) + infix def a[U](aMatcher: AMatcher[U]): Matcher[T with U] = or(MatcherWords.be.a(aMatcher)) // SKIP-SCALATESTJS,NATIVE-START /** @@ -2208,7 +2208,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an(symbol: Symbol): Matcher[T with AnyRef] = or(MatcherWords.be.an(symbol)) + infix def an(symbol: Symbol): Matcher[T with AnyRef] = or(MatcherWords.be.an(symbol)) // SKIP-SCALATESTJS,NATIVE-END /** @@ -2219,7 +2219,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = or(MatcherWords.be.an(bePropertyMatcher)) + infix def an[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = or(MatcherWords.be.an(bePropertyMatcher)) /** * This method enables the following syntax, where oddNumber and integerNumber are AnMatcher: @@ -2229,7 +2229,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def an[U](anMatcher: AnMatcher[U]): Matcher[T with U] = or(MatcherWords.be.an(anMatcher)) + infix def an[U](anMatcher: AnMatcher[U]): Matcher[T with U] = or(MatcherWords.be.an(anMatcher)) /** * This method enables the following syntax: @@ -2239,7 +2239,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def theSameInstanceAs(anyRef: AnyRef): Matcher[T with AnyRef] = or(MatcherWords.be.theSameInstanceAs(anyRef)) + infix def theSameInstanceAs(anyRef: AnyRef): Matcher[T with AnyRef] = or(MatcherWords.be.theSameInstanceAs(anyRef)) /** * This method enables the following syntax, where fraction refers to a PartialFunction: @@ -2249,7 +2249,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[T with U] = or(MatcherWords.be.definedAt(right)) + infix def definedAt[A, U <: PartialFunction[A, _]](right: A): Matcher[T with U] = or(MatcherWords.be.definedAt(right)) } /** @@ -2260,7 +2260,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(beWord: BeWord): OrBeWord = new OrBeWord + infix 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 @@ -2278,7 +2278,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regexString)) /** * This method enables the following syntax: @@ -2288,7 +2288,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -2298,7 +2298,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.fullyMatch.regex(regex)) } /** @@ -2309,7 +2309,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(fullyMatchWord: FullyMatchWord): OrFullyMatchWord = new OrFullyMatchWord + infix 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 @@ -2327,7 +2327,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = or(MatcherWords.include.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = or(MatcherWords.include.regex(regexString)) /** * This method enables the following syntax: @@ -2337,7 +2337,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.include.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.include.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -2347,7 +2347,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.include.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.include.regex(regex)) } /** @@ -2358,7 +2358,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(includeWord: IncludeWord): OrIncludeWord = new OrIncludeWord + infix 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 @@ -2376,7 +2376,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = or(MatcherWords.startWith.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = or(MatcherWords.startWith.regex(regexString)) /** * This method enables the following syntax: @@ -2386,7 +2386,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.startWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.startWith.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -2396,7 +2396,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.startWith.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.startWith.regex(regex)) } /** @@ -2407,7 +2407,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(startWithWord: StartWithWord): OrStartWithWord = new OrStartWithWord + infix 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 @@ -2425,7 +2425,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexString: String): Matcher[T with String] = or(MatcherWords.endWith.regex(regexString)) + infix def regex(regexString: String): Matcher[T with String] = or(MatcherWords.endWith.regex(regexString)) /** * This method enables the following syntax: @@ -2435,7 +2435,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.endWith.regex(regexWithGroups)) + infix def regex(regexWithGroups: RegexWithGroups): Matcher[T with String] = or(MatcherWords.endWith.regex(regexWithGroups)) /** * This method enables the following syntax: @@ -2445,7 +2445,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.endWith.regex(regex)) + infix def regex(regex: Regex): Matcher[T with String] = or(MatcherWords.endWith.regex(regex)) } /** @@ -2456,7 +2456,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(endWithWord: EndWithWord): OrEndWithWord = new OrEndWithWord + infix 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 @@ -2479,7 +2479,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal(any: Any): MatcherFactory1[T, Equality] = + infix def equal(any: Any): MatcherFactory1[T, Equality] = outerInstance.or(MatcherWords.not.apply(MatcherWords.equal(any))) /** @@ -2490,7 +2490,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal[U](spread: Spread[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.equal(spread)) + infix def equal[U](spread: Spread[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.equal(spread)) /** * This method enables the following syntax: @@ -2500,7 +2500,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def equal(o: Null): Matcher[T] = { + infix def equal(o: Null): Matcher[T] = { outerInstance or { new Matcher[T] { def apply(left: T): MatchResult = { @@ -2527,7 +2527,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(any: Any): Matcher[T] = + infix def be(any: Any): Matcher[T] = outerInstance.or(MatcherWords.not.apply(MatcherWords.be(any))) /** @@ -2538,7 +2538,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory1[T, Length] = + infix def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): MatcherFactory1[T, Length] = outerInstance.or(MatcherWords.not.apply(MatcherWords.have.length(resultOfLengthWordApplication.expectedLength))) /** @@ -2549,7 +2549,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory1[T, Size] = + infix def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): MatcherFactory1[T, Size] = outerInstance.or(MatcherWords.not.apply(MatcherWords.have.size(resultOfSizeWordApplication.expectedSize))) /** @@ -2560,7 +2560,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory1[T, Messaging] = + infix def have(resultOfMessageWordApplication: ResultOfMessageWordApplication): MatcherFactory1[T, Messaging] = outerInstance.or(MatcherWords.not.apply(MatcherWords.have.message(resultOfMessageWordApplication.expectedMessage))) /** @@ -2571,7 +2571,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): Matcher[T with U] = + infix def have[U](firstPropertyMatcher: HavePropertyMatcher[U, _], propertyMatchers: HavePropertyMatcher[U, _]*): Matcher[T with U] = outerInstance.or(MatcherWords.not.apply(MatcherWords.have(firstPropertyMatcher, propertyMatchers: _*))) /** @@ -2582,7 +2582,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(o: Null): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(o)) + infix def be(o: Null): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(o)) /** * This method enables the following syntax: @@ -2592,7 +2592,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): Matcher[T with U] = + infix def be[U](resultOfLessThanComparison: ResultOfLessThanComparison[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfLessThanComparison)) /** @@ -2603,7 +2603,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): Matcher[T with U] = + infix def be[U](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfGreaterThanComparison)) /** @@ -2614,7 +2614,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): Matcher[T with U] = + infix def be[U](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfLessThanOrEqualToComparison)) /** @@ -2625,7 +2625,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): Matcher[T with U] = + infix def be[U](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfGreaterThanOrEqualToComparison)) /** @@ -2636,7 +2636,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): Matcher[T] = + infix def be(tripleEqualsInvocation: TripleEqualsInvocation[_]): Matcher[T] = outerInstance.or(MatcherWords.not.be(tripleEqualsInvocation)) /** @@ -2647,7 +2647,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(symbol: Symbol): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(symbol)) + infix def be(symbol: Symbol): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(symbol)) /** * This method enables the following syntax, where odd is a BeMatcher: @@ -2657,7 +2657,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](beMatcher: BeMatcher[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(beMatcher)) + infix def be[U](beMatcher: BeMatcher[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(beMatcher)) /** * This method enables the following syntax, where file is a BePropertyMatcher: @@ -2667,7 +2667,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = outerInstance.or(MatcherWords.not.be(bePropertyMatcher)) + infix def be[U](bePropertyMatcher: BePropertyMatcher[U]): Matcher[T with AnyRef with U] = outerInstance.or(MatcherWords.not.be(bePropertyMatcher)) /** * This method enables the following syntax: @@ -2677,7 +2677,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be(resultOfAWordApplication: ResultOfAWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax, where validMarks is an AMatcher: @@ -2687,7 +2687,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U](resultOfAWordApplication: ResultOfAWordToAMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax, where file is a BePropertyMatcher: @@ -2697,7 +2697,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) + infix def be[U <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAWordApplication)) /** * This method enables the following syntax: @@ -2707,7 +2707,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax, where apple is a BePropertyMatcher: @@ -2717,7 +2717,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax, where invalidMarks is an AnMatcher: @@ -2727,7 +2727,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) + infix def be[U](resultOfAnWordApplication: ResultOfAnWordToAnMatcherApplication[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfAnWordApplication)) /** * This method enables the following syntax: @@ -2737,7 +2737,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def be(aType: ResultOfATypeInvocation[_]): Matcher[T] = + inline infix def be(aType: ResultOfATypeInvocation[_]): Matcher[T] = ${ TypeMatcherMacro.orNotATypeMatcher('{thisOrNotWord: Matcher[T]#OrNotWord}, '{aType}) } /** @@ -2748,7 +2748,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def be(anType: ResultOfAnTypeInvocation[_]): Matcher[T] = + inline infix def be(anType: ResultOfAnTypeInvocation[_]): Matcher[T] = ${ TypeMatcherMacro.orNotAnTypeMatcher('{thisOrNotWord: Matcher[T]#OrNotWord}, '{anType}) } /** @@ -2759,7 +2759,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) + infix def be(resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): Matcher[T with AnyRef] = outerInstance.or(MatcherWords.not.be(resultOfTheSameInstanceAsApplication)) /** * This method enables the following syntax for the "primitive" numeric types: @@ -2769,7 +2769,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[U](spread: Spread[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(spread)) + infix def be[U](spread: Spread[U]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(spread)) /** * This method enables the following syntax: @@ -2779,7 +2779,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): Matcher[T with U] = + infix def be[A, U <: PartialFunction[A, _]](resultOfDefinedAt: ResultOfDefinedAt[A]): Matcher[T with U] = outerInstance.or(MatcherWords.not.be(resultOfDefinedAt)) /** @@ -2790,7 +2790,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(sortedWord: SortedWord) = + infix def be(sortedWord: SortedWord) = outerInstance.or(MatcherWords.not.be(sortedWord)) /** @@ -2801,7 +2801,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(readableWord: ReadableWord) = + infix def be(readableWord: ReadableWord) = outerInstance.or(MatcherWords.not.be(readableWord)) /** @@ -2812,7 +2812,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(emptyWord: EmptyWord) = + infix def be(emptyWord: EmptyWord) = outerInstance.or(MatcherWords.not.be(emptyWord)) /** @@ -2823,7 +2823,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(writableWord: WritableWord) = + infix def be(writableWord: WritableWord) = outerInstance.or(MatcherWords.not.be(writableWord)) /** @@ -2834,7 +2834,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def be(definedWord: DefinedWord) = + infix def be(definedWord: DefinedWord) = outerInstance.or(MatcherWords.not.be(definedWord)) /** @@ -2845,7 +2845,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.or(MatcherWords.not.fullyMatch(resultOfRegexWordApplication)) /** @@ -2856,7 +2856,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.or(MatcherWords.not.include(resultOfRegexWordApplication)) /** @@ -2867,7 +2867,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def include(expectedSubstring: String): Matcher[T with String] = + infix def include(expectedSubstring: String): Matcher[T with String] = outerInstance.or(MatcherWords.not.include(expectedSubstring)) /** @@ -2878,7 +2878,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.or(MatcherWords.not.startWith(resultOfRegexWordApplication)) /** @@ -2889,7 +2889,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def startWith(expectedSubstring: String): Matcher[T with String] = + infix def startWith(expectedSubstring: String): Matcher[T with String] = outerInstance.or(MatcherWords.not.startWith(expectedSubstring)) /** @@ -2900,7 +2900,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = + infix def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String] = outerInstance.or(MatcherWords.not.endWith(resultOfRegexWordApplication)) /** @@ -2911,7 +2911,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def endWith(expectedSubstring: String): Matcher[T with String] = + infix def endWith(expectedSubstring: String): Matcher[T with String] = outerInstance.or(MatcherWords.not.endWith(expectedSubstring)) /** @@ -2922,7 +2922,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain[U](expectedElement: U): MatcherFactory1[T, Containing] = + infix def contain[U](expectedElement: U): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.not.contain(expectedElement)) /** @@ -2933,7 +2933,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOneOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfOneOfApplication): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2944,7 +2944,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOneElementOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfOneElementOfApplication): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2955,7 +2955,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtLeastOneOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2966,7 +2966,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtLeastOneElementOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2977,7 +2977,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfNoneOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfNoneOfApplication): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2988,7 +2988,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfNoElementsOfApplication): MatcherFactory1[T, Containing] = + infix def contain(right: ResultOfNoElementsOfApplication): MatcherFactory1[T, Containing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -2999,7 +2999,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfTheSameElementsAsApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3010,7 +3010,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfTheSameElementsInOrderAsApplication): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3021,7 +3021,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderOnlyApplication): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3032,7 +3032,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfOnlyApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfOnlyApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3043,7 +3043,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAllOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAllOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3054,7 +3054,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAllElementsOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAllElementsOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3065,7 +3065,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderApplication): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3076,7 +3076,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory1[T, Sequencing] = + infix def contain(right: ResultOfInOrderElementsOfApplication): MatcherFactory1[T, Sequencing] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3087,7 +3087,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtMostOneOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3098,7 +3098,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory1[T, Aggregating] = + infix def contain(right: ResultOfAtMostOneElementOfApplication): MatcherFactory1[T, Aggregating] = outerInstance.or(MatcherWords.not.contain(right)) /** @@ -3109,7 +3109,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory1[T, KeyMapping] = + infix def contain(resultOfKeyWordApplication: ResultOfKeyWordApplication): MatcherFactory1[T, KeyMapping] = outerInstance.or(MatcherWords.not.contain(resultOfKeyWordApplication)) /** @@ -3120,7 +3120,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory1[T, ValueMapping] = + infix def contain(resultOfValueWordApplication: ResultOfValueWordApplication): MatcherFactory1[T, ValueMapping] = outerInstance.or(MatcherWords.not.contain(resultOfValueWordApplication)) /** @@ -3131,7 +3131,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - inline def matchPattern(inline right: PartialFunction[Any, _]) = + inline infix def matchPattern(inline right: PartialFunction[Any, _]) = ${ MatchPatternMacro.orNotMatchPatternMatcher('{thisOrNotWord: Matcher[T]#OrNotWord}, '{right}) } } @@ -3143,7 +3143,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(notWord: NotWord): OrNotWord = new OrNotWord + infix def or(notWord: NotWord): OrNotWord = new OrNotWord /** * This method enables the following syntax: @@ -3153,7 +3153,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(existWord: ExistWord): MatcherFactory1[T, Existence] = + infix def or(existWord: ExistWord): MatcherFactory1[T, Existence] = outerInstance.or(MatcherWords.exist.matcherFactory) /** @@ -3164,7 +3164,7 @@ trait Matcher[-T] extends Function1[T, MatchResult] { outerInstance => * ^ * **/ - def or(notExist: ResultOfNotExist): MatcherFactory1[T, Existence] = + infix def or(notExist: ResultOfNotExist): MatcherFactory1[T, Existence] = outerInstance.or(MatcherWords.not.exist) /** From 31486417789b23b4c7b2e8e9e1103138d8ae1536 Mon Sep 17 00:00:00 2001 From: Chua Chee Seng Date: Sun, 13 Nov 2022 11:32:49 +0800 Subject: [PATCH 7/7] Removed @infix for symbolic '-' function in FreeSpec. --- .../src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala | 1 - .../main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala | 1 - .../scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala | 1 - .../scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala | 1 - .../main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala | 1 - 5 files changed, 5 deletions(-) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala index e09361f4b0..447a1624ad 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/AnyFreeSpecLike.scala @@ -276,7 +276,6 @@ trait AnyFreeSpecLike extends TestSuite with TestRegistration with Informing wit * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ - //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala index fd11c5c6bb..26ca4690cb 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/AsyncFreeSpecLike.scala @@ -282,7 +282,6 @@ trait AsyncFreeSpecLike extends AsyncTestSuite with AsyncTestRegistration with I * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ - //DOTTY-ONLY infix def -(fun: => Unit): Unit = { try { diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala index 8ef5f2f183..cbd2508774 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAnyFreeSpecLike.scala @@ -360,7 +360,6 @@ trait FixtureAnyFreeSpecLike extends org.scalatest.FixtureTestSuite with org.sca * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ - //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala index e12fef4e68..7a261afa01 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/FixtureAsyncFreeSpecLike.scala @@ -339,7 +339,6 @@ trait FixtureAsyncFreeSpecLike extends org.scalatest.FixtureAsyncTestSuite with * implementation of this method will register the text (passed to the contructor of FreeSpecStringWrapper * and immediately invoke the passed function. */ - //DOTTY-ONLY infix def -(fun: => Unit): Unit = { try { registerNestedBranch(string, None, fun, Resources.dashCannotAppearInsideAnIn, None, pos) diff --git a/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala b/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala index d2c31e7b1b..39152a7c3c 100644 --- a/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala +++ b/jvm/freespec/src/main/scala/org/scalatest/freespec/PathAnyFreeSpecLike.scala @@ -266,7 +266,6 @@ trait PathAnyFreeSpecLike extends org.scalatest.Suite with OneInstancePerTest wi * the How it executes section of the main documentation for trait * org.scalatest.freespec.PathAnyFreeSpec. */ - //DOTTY-ONLY infix def -(fun: => Unit): Unit = { // SKIP-SCALATESTJS,NATIVE-START