Skip to content

Commit 3457a4e

Browse files
oderskycheeseng
authored andcommitted
Fix ambiguous reference
1 parent 3cfd618 commit 3457a4e

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

scalatest/src/main/scala/org/scalatest/flatspec/AnyFlatSpecLike.scala

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import verbs.{ResultOfTaggedAsInvocation, ResultOfStringPassedToVerb, BehaveWord
2828
* Implementation trait for class <code>AnyFlatSpec</code>, which facilitates a
2929
* &ldquo;behavior-driven&rdquo; style of development (BDD), in which tests
3030
* are combined with text that specifies the behavior the tests verify.
31-
*
31+
*
3232
* <p>
3333
* <a href="AnyFlatSpec.html"><code>AnyFlatSpec</code></a> is a class, not a trait,
3434
* to minimize compile time given there is a slight compiler overhead to
@@ -204,7 +204,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
204204
* </pre>
205205
*
206206
* <p>
207-
* For more information and examples of the use of the <code>behavior</code> field, see the main documentation
207+
* For more information and examples of the use of the <code>behavior</code> field, see the main documentation
208208
* for this trait.
209209
* </p>
210210
*/
@@ -470,7 +470,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
470470
* </pre>
471471
*
472472
* <p>
473-
* For more information and examples of the use of the <code>it</code> field, see the main documentation
473+
* For more information and examples of the use of the <code>it</code> field, see the main documentation
474474
* for this trait.
475475
* </p>
476476
*/
@@ -613,7 +613,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
613613
* </pre>
614614
*
615615
* <p>
616-
* For more information and examples of the use of the <code>it</code> field, see the main documentation
616+
* For more information and examples of the use of the <code>it</code> field, see the main documentation
617617
* for this trait.
618618
* </p>
619619
*/
@@ -924,7 +924,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
924924
* </p>
925925
*/
926926
protected val ignore = new IgnoreWord
927-
927+
928928
/**
929929
* Class that supports the registration of tagged tests via the <code>TheyWord</code> instance
930930
* referenced from <code>AnyFlatSpec</code>'s <code>they</code> field.
@@ -1185,7 +1185,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
11851185
* </pre>
11861186
*
11871187
* <p>
1188-
* For more information and examples of the use of the <code>it</code> field, see the main documentation
1188+
* For more information and examples of the use of the <code>it</code> field, see the main documentation
11891189
* for this trait.
11901190
* </p>
11911191
*/
@@ -1328,7 +1328,7 @@ trait AnyFlatSpecLike extends TestSuite with TestRegistration with ShouldVerb wi
13281328
* </pre>
13291329
*
13301330
* <p>
1331-
* For more information and examples of the use of the <code>it</code> field, see the main documentation
1331+
* For more information and examples of the use of the <code>it</code> field, see the main documentation
13321332
* for this trait.
13331333
* </p>
13341334
*/
@@ -1398,7 +1398,7 @@ import resultOfStringPassedToVerb.verb
13981398
def in(testFun: => Any /* Assertion */)(implicit pos: source.Position): Unit = {
13991399
registerTestToRun(verb.trim + " " + rest.trim, "in", List(), () => testFun, pos)
14001400
}
1401-
1401+
14021402
/**
14031403
* Supports the registration of ignored tests in shorthand form.
14041404
*
@@ -1430,7 +1430,7 @@ import resultOfStringPassedToVerb.verb
14301430
*/
14311431
protected implicit def convertToInAndIgnoreMethods(resultOfStringPassedToVerb: ResultOfStringPassedToVerb): InAndIgnoreMethods =
14321432
new InAndIgnoreMethods(resultOfStringPassedToVerb)
1433-
1433+
14341434
/**
14351435
* Class that supports tagged test registration in shorthand form.
14361436
*
@@ -1562,17 +1562,17 @@ import resultOfStringPassedToVerb.verb
15621562
new ResultOfStringPassedToVerb(verb, rest) {
15631563

15641564
def is(testFun: => PendingStatement): Unit = {
1565-
registerTestToRun(verb.trim + " " + rest.trim, "is", List(), () => { testFun; succeed }, pos)
1565+
registerTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => { testFun; succeed }, pos)
15661566
}
15671567
// Note, won't have an is method that takes fixture => PendingStatement one, because don't want
15681568
// to say is (fixture => pending), rather just say is (pending)
15691569
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
15701570
val tagList = firstTestTag :: otherTestTags.toList
1571-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1571+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
15721572
// "A Stack" should "bla bla" taggedAs(SlowTest) is (pending)
15731573
// ^
15741574
def is(testFun: => PendingStatement): Unit = {
1575-
registerTestToRun(verb.trim + " " + rest.trim, "is", tags, () => { testFun; succeed }, pos)
1575+
registerTestToRun(this.verb.trim + " " + this.rest.trim, "is", this.tags, () => { testFun; succeed }, pos)
15761576
}
15771577
}
15781578
}
@@ -1608,7 +1608,7 @@ import resultOfStringPassedToVerb.verb
16081608
}
16091609
}
16101610

1611-
// TODO: I got a:
1611+
// TODO: I got a:
16121612
// runsuite:
16131613
// [scalatest] *** RUN ABORTED ***
16141614
// [scalatest] An exception or error caused a run to abort: Duplicate test name: should return the new exception with the clue string appended, separated by a space char if passed a function that does that (Engine.scala:464)
@@ -1647,12 +1647,12 @@ import resultOfStringPassedToVerb.verb
16471647
* the <code>Set</code> of tags for the test. If this <code>AnyFlatSpec</code> contains no tags, this method returns an empty <code>Map</code>.
16481648
*
16491649
* <p>
1650-
* This trait's implementation returns tags that were passed as strings contained in <code>Tag</code> objects passed to
1651-
* <code>taggedAs</code>.
1650+
* This trait's implementation returns tags that were passed as strings contained in <code>Tag</code> objects passed to
1651+
* <code>taggedAs</code>.
16521652
* </p>
1653-
*
1653+
*
16541654
* <p>
1655-
* In addition, this trait's implementation will also auto-tag tests with class level annotations.
1655+
* In addition, this trait's implementation will also auto-tag tests with class level annotations.
16561656
* For example, if you annotate <code>@Ignore</code> at the class level, all test methods in the class will be auto-annotated with
16571657
* <code>org.scalatest.Ignore</code>.
16581658
* </p>
@@ -1814,7 +1814,7 @@ import resultOfStringPassedToVerb.verb
18141814
* </p>
18151815
*/
18161816
protected val behave = new BehaveWord
1817-
1817+
18181818
/**
18191819
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
18201820
*

scalatest/src/main/scala/org/scalatest/flatspec/AsyncFlatSpecLike.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,17 +1564,17 @@ import resultOfStringPassedToVerb.verb
15641564
new ResultOfStringPassedToVerb(verb, rest) {
15651565

15661566
def is(testFun: => PendingStatement): Unit = {
1567-
registerPendingTestToRun(verb.trim + " " + rest.trim, "is", List(), () => testFun, pos)
1567+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, "is", List(), () => testFun, pos)
15681568
}
15691569
// Note, won't have an is method that takes fixture => PendingStatement one, because don't want
15701570
// to say is (fixture => pending), rather just say is (pending)
15711571
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
15721572
val tagList = firstTestTag :: otherTestTags.toList
1573-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1573+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
15741574
// "A Stack" should "bla bla" taggedAs(SlowTest) is (pending)
15751575
// ^
15761576
def is(testFun: => PendingStatement): Unit = {
1577-
registerPendingTestToRun(verb.trim + " " + rest.trim, "is", tags, () => testFun, pos)
1577+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, "is", this.tags, () => testFun, pos)
15781578
}
15791579
}
15801580
}

scalatest/src/main/scala/org/scalatest/flatspec/FixtureAnyFlatSpecLike.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,15 +2011,15 @@ import resultOfStringPassedToVerb.verb
20112011
registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, sourceFileName, "apply", stackDepth, 0, Some(pos))
20122012
new ResultOfStringPassedToVerb(verb, rest) {
20132013
def is(testFun: => PendingStatement): Unit = {
2014-
registerPendingTestToRun(verb.trim + " " + rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
2014+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
20152015
}
20162016
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
20172017
val tagList = firstTestTag :: otherTestTags.toList
2018-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
2018+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
20192019
// "A Stack" must "test this" taggedAs(mytags.SlowAsMolasses) is (pending)
20202020
// ^
20212021
def is(testFun: => PendingStatement): Unit = {
2022-
registerPendingTestToRun(verb.trim + " " + rest.trim, tags, "is", new NoArgTestWrapper(() => testFun), pos)
2022+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, this.tags, "is", new NoArgTestWrapper(() => testFun), pos)
20232023
}
20242024
}
20252025
}
@@ -2051,7 +2051,7 @@ import resultOfStringPassedToVerb.verb
20512051
*/
20522052
protected implicit val shorthandSharedTestRegistrationFunction: StringVerbBehaveLikeInvocation =
20532053
new StringVerbBehaveLikeInvocation {
2054-
def apply(subject: String, pos: source.Position): BehaveWord = {
2054+
def apply(subject: String, pos: source.Position): BehaveWord = {
20552055
registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, sourceFileName, "apply", 5, 0, Some(pos))
20562056
new BehaveWord
20572057
}

scalatest/src/main/scala/org/scalatest/flatspec/FixtureAsyncFlatSpecLike.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,22 +1981,22 @@ import resultOfStringPassedToVerb.verb
19811981
* initialized with the verb and rest parameters (the second and third parameters to
19821982
* the function, respectively).
19831983
* </p>
1984-
*/
1984+
*/
19851985
protected implicit val shorthandTestRegistrationFunction: StringVerbStringInvocation =
19861986
new StringVerbStringInvocation {
19871987
def apply(subject: String, verb: String, rest: String, pos: source.Position): ResultOfStringPassedToVerb = {
19881988
registerFlatBranch(subject, Resources.shouldCannotAppearInsideAnIn, pos)
19891989
new ResultOfStringPassedToVerb(verb, rest) {
19901990
def is(testFun: => PendingStatement): Unit = {
1991-
registerPendingTestToRun(verb.trim + " " + rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
1991+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, List(), "is", unusedFixtureParam => testFun, pos)
19921992
}
19931993
def taggedAs(firstTestTag: Tag, otherTestTags: Tag*) = {
19941994
val tagList = firstTestTag :: otherTestTags.toList
1995-
new ResultOfTaggedAsInvocation(verb, rest, tagList) {
1995+
new ResultOfTaggedAsInvocation(this.verb, this.rest, tagList) {
19961996
// "A Stack" must "test this" taggedAs(mytags.SlowAsMolasses) is (pending)
19971997
// ^
19981998
def is(testFun: => PendingStatement): Unit = {
1999-
registerPendingTestToRun(verb.trim + " " + rest.trim, tags, "is", new NoArgTestWrapper(() => testFun), pos)
1999+
registerPendingTestToRun(this.verb.trim + " " + this.rest.trim, this.tags, "is", new NoArgTestWrapper(() => testFun), pos)
20002000
}
20012001
}
20022002
}

0 commit comments

Comments
 (0)