Skip to content

Commit d5d8cda

Browse files
committed
Added deprecation warning to styleName lifecycle method.
1 parent a93f240 commit d5d8cda

35 files changed

+144
-133
lines changed

scalatest/src/main/scala/org/scalatest/FixtureSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,12 @@ trait FixtureSuite extends org.scalatest.Suite { thisSuite =>
336336
*/
337337

338338
/**
339-
* Suite style name.
339+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
340340
*
341-
* @return `org.scalatest.FixtureSuite`
341+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
342+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
342343
*/
344+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
343345
override val styleName: String = "org.scalatest.FixtureSuite"
344346
}
345347

scalatest/src/main/scala/org/scalatest/Suite.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,12 +1322,14 @@ trait Suite extends Assertions with Serializable { thisSuite =>
13221322
}
13231323

13241324
/**
1325-
* Suite style name.
1325+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
13261326
*
1327-
* @return `org.scalatest.Suite`
1327+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
1328+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
13281329
*/
1330+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
13291331
val styleName: String = "org.scalatest.Suite"
1330-
1332+
13311333
/**
13321334
* Provides a <code>TestData</code> instance for the passed test name, given the passed config map.
13331335
*

scalatest/src/main/scala/org/scalatest/SuiteMixin.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,12 @@ trait SuiteMixin { this: Suite =>
180180
def rerunner: Option[String]
181181

182182
/**
183-
* This suite's style name.
183+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
184184
*
185-
* <p>
186-
* This lifecycle method provides a string that is used to determine whether this suite object's
187-
* style is one of the <a href="tools/Runner$.html#specifyingChosenStyles">chosen styles</a> for
188-
* the project.
189-
* </p>
185+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
186+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
190187
*/
188+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
191189
val styleName: String
192190
}
193191

scalatest/src/main/scala/org/scalatest/featurespec/AnyFeatureSpecLike.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,12 @@ trait AnyFeatureSpecLike extends TestSuite with TestRegistration with Informing
394394
protected def ScenariosFor(unit: Unit): Unit = {}
395395

396396
/**
397-
* Suite style name.
397+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
398398
*
399-
* @return `org.scalatest.featurespec.AnyFeatureSpec`
399+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
400+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
400401
*/
402+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
401403
final override val styleName: String = "org.scalatest.featurespec.AnyFeatureSpec"
402404

403405
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

scalatest/src/main/scala/org/scalatest/featurespec/AsyncFeatureSpecLike.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,12 @@ trait AsyncFeatureSpecLike extends AsyncTestSuite with AsyncTestRegistration wit
376376
protected def ScenariosFor(unit: Unit): Unit = {}
377377

378378
/**
379-
* Suite style name.
379+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
380380
*
381-
* @return `org.scalatest.featurespec.AsyncFeatureSpec`
381+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
382+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
382383
*/
384+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
383385
final override val styleName: String = "org.scalatest.featurespec.AsyncFeatureSpec"
384386

385387
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

scalatest/src/main/scala/org/scalatest/featurespec/FixtureAnyFeatureSpecLike.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,12 @@ trait FixtureAnyFeatureSpecLike extends org.scalatest.FixtureTestSuite with org.
427427
*/
428428

429429
/**
430-
* Suite style name.
430+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
431431
*
432-
* @return `org.scalatest.featurespec.FixtureAnyFeatureSpec`
432+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
433+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
433434
*/
435+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
434436
final override val styleName: String = "org.scalatest.featurespec.FixtureAnyFeatureSpec"
435437

436438
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

scalatest/src/main/scala/org/scalatest/featurespec/FixtureAsyncFeatureSpecLike.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,12 @@ trait FixtureAsyncFeatureSpecLike extends org.scalatest.FixtureAsyncTestSuite wi
393393
*/
394394

395395
/**
396-
* Suite style name.
396+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
397397
*
398-
* @return `org.scalatest.featurespec.FixtureAsyncFeatureSpec`
398+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
399+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
399400
*/
401+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
400402
final override val styleName: String = "org.scalatest.featurespec.FixtureAsyncFeatureSpec"
401403

402404
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,10 +1816,12 @@ import resultOfStringPassedToVerb.verb
18161816
protected val behave = new BehaveWord
18171817

18181818
/**
1819-
* Suite style name.
1819+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
18201820
*
1821-
* @return `org.scalatest.flatspec.AnyFlatSpec`
1821+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
1822+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
18221823
*/
1824+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
18231825
final override val styleName: String = "org.scalatest.flatspec.AnyFlatSpec"
18241826

18251827
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,10 +1832,12 @@ import resultOfStringPassedToVerb.verb
18321832
protected val behave = new BehaveWord
18331833

18341834
/**
1835-
* Suite style name.
1835+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
18361836
*
1837-
* @return `org.scalatest.flatspec.AsyncFlatSpec`
1837+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
1838+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
18381839
*/
1840+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
18391841
final override val styleName: String = "org.scalatest.flatspec.AsyncFlatSpec"
18401842

18411843
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,12 +2223,12 @@ import resultOfStringPassedToVerb.verb
22232223
protected val behave = new BehaveWord
22242224

22252225
/**
2226-
* Suite style name.
2226+
* <strong>The <code>styleName</code> lifecycle method has been deprecated and will be removed in a future version of ScalaTest.</strong>
22272227
*
2228-
* @return <code>org.scalatest.fixture.FlatSpec</code>
2229-
*
2230-
* @return `org.scalatest.flatspec.FixtureAnyFlatSpec`
2228+
* <p>This method was used to support the chosen styles feature, which was deactivated in 3.1.0. The internal modularization of ScalaTest in 3.2.0
2229+
* will replace chosen styles as the tool to encourage consistency across a project. We do not plan a replacement for <code>styleName</code>.</p>
22312230
*/
2231+
@deprecated("The styleName lifecycle method has been deprecated and will be removed in a future version of ScalaTest with no replacement.", "3.1.0")
22322232
final override val styleName: String = "org.scalatest.flatspec.FixtureAnyFlatSpec"
22332233

22342234
override def testDataFor(testName: String, theConfigMap: ConfigMap = ConfigMap.empty): TestData = createTestDataFor(testName, theConfigMap, this)

0 commit comments

Comments
 (0)