Skip to content

Commit

Permalink
Merge branch 'cheeseng-feature-expectations-module'
Browse files Browse the repository at this point in the history
  • Loading branch information
bvenners committed Jul 25, 2023
2 parents 80d1f66 + cffbca3 commit e66aebf
Show file tree
Hide file tree
Showing 16 changed files with 274 additions and 17 deletions.
12 changes: 12 additions & 0 deletions build.sbt
Expand Up @@ -22,6 +22,7 @@ lazy val scalacticTestDottyNative = ScalatestBuild.scalacticTestDottyNative
lazy val scalatest = ScalatestBuild.scalatest
lazy val scalatestTest = ScalatestBuild.scalatestTest
lazy val scalatestDiagramsTest = ScalatestBuild.scalatestDiagramsTest
lazy val scalatestExpectationsTest = ScalatestBuild.scalatestExpectationsTest
lazy val scalatestFeatureSpecTest = ScalatestBuild.scalatestFeatureSpecTest
lazy val scalatestFlatSpecTest = ScalatestBuild.scalatestFlatSpecTest
lazy val scalatestFreeSpecTest = ScalatestBuild.scalatestFreeSpecTest
Expand All @@ -36,6 +37,7 @@ lazy val scalatestDottyJS = ScalatestBuild.scalatestDottyJS
lazy val scalatestDottyNative = ScalatestBuild.scalatestDottyNative
lazy val scalatestTestJS = ScalatestBuild.scalatestTestJS
lazy val scalatestDiagramsTestJS = ScalatestBuild.scalatestDiagramsTestJS
lazy val scalatestExpectationsTestJS = ScalatestBuild.scalatestExpectationsTestJS
lazy val scalatestFeatureSpecTestJS = ScalatestBuild.scalatestFeatureSpecTestJS
lazy val scalatestFlatSpecTestJS = ScalatestBuild.scalatestFlatSpecTestJS
lazy val scalatestFreeSpecTestJS = ScalatestBuild.scalatestFreeSpecTestJS
Expand All @@ -45,6 +47,7 @@ lazy val scalatestPropSpecTestJS = ScalatestBuild.scalatestPropSpecTestJS
lazy val scalatestWordSpecTestJS = ScalatestBuild.scalatestWordSpecTestJS
lazy val scalatestTestNative = ScalatestBuild.scalatestTestNative
lazy val scalatestDiagramsTestNative = ScalatestBuild.scalatestDiagramsTestNative
lazy val scalatestExpectationsTestNative = ScalatestBuild.scalatestExpectationsTestNative
lazy val scalatestFeatureSpecTestNative = ScalatestBuild.scalatestFeatureSpecTestNative
lazy val scalatestFlatSpecTestNative = ScalatestBuild.scalatestFlatSpecTestNative
lazy val scalatestFreeSpecTestNative = ScalatestBuild.scalatestFreeSpecTestNative
Expand All @@ -58,6 +61,9 @@ lazy val scalatestTestDottyNative = ScalatestBuild.scalatestTestDottyNative
lazy val scalatestDiagramsTestDotty = ScalatestBuild.scalatestDiagramsTestDotty
lazy val scalatestDiagramsTestDottyJS = ScalatestBuild.scalatestDiagramsTestDottyJS
lazy val scalatestDiagramsTestDottyNative = ScalatestBuild.scalatestDiagramsTestDottyNative
lazy val scalatestExpectationsTestDotty = ScalatestBuild.scalatestExpectationsTestDotty
lazy val scalatestExpectationsTestDottyJS = ScalatestBuild.scalatestExpectationsTestDottyJS
lazy val scalatestExpectationsTestDottyNative = ScalatestBuild.scalatestExpectationsTestDottyNative
lazy val scalatestFeatureSpecTestDotty = ScalatestBuild.scalatestFeatureSpecTestDotty
lazy val scalatestFeatureSpecTestDottyJS = ScalatestBuild.scalatestFeatureSpecTestDottyJS
lazy val scalatestFeatureSpecTestDottyNative = ScalatestBuild.scalatestFeatureSpecTestDottyNative
Expand Down Expand Up @@ -116,6 +122,7 @@ lazy val scalatestPropSpec = ScalatestBuild.scalatestPropSpec
lazy val scalatestRefSpec = ScalatestBuild.scalatestRefSpec
lazy val scalatestWordSpec = ScalatestBuild.scalatestWordSpec
lazy val scalatestDiagrams = ScalatestBuild.scalatestDiagrams
lazy val scalatestExpectations = ScalatestBuild.scalatestExpectations
lazy val scalatestMatchersCore = ScalatestBuild.scalatestMatchersCore
lazy val scalatestShouldMatchers = ScalatestBuild.scalatestShouldMatchers
lazy val scalatestMustMatchers = ScalatestBuild.scalatestMustMatchers
Expand All @@ -129,6 +136,7 @@ lazy val scalatestFunSpecJS = ScalatestBuild.scalatestFunSpecJS
lazy val scalatestPropSpecJS = ScalatestBuild.scalatestPropSpecJS
lazy val scalatestWordSpecJS = ScalatestBuild.scalatestWordSpecJS
lazy val scalatestDiagramsJS = ScalatestBuild.scalatestDiagramsJS
lazy val scalatestExpectationsJS = ScalatestBuild.scalatestExpectationsJS
lazy val scalatestMatchersCoreJS = ScalatestBuild.scalatestMatchersCoreJS
lazy val scalatestShouldMatchersJS = ScalatestBuild.scalatestShouldMatchersJS
lazy val scalatestMustMatchersJS = ScalatestBuild.scalatestMustMatchersJS
Expand All @@ -141,6 +149,7 @@ lazy val scalatestFunSpecNative = ScalatestBuild.scalatestFunSpecNative
lazy val scalatestPropSpecNative = ScalatestBuild.scalatestPropSpecNative
lazy val scalatestWordSpecNative = ScalatestBuild.scalatestWordSpecNative
lazy val scalatestDiagramsNative = ScalatestBuild.scalatestDiagramsNative
lazy val scalatestExpectationsNative = ScalatestBuild.scalatestExpectationsNative
lazy val scalatestMatchersCoreNative = ScalatestBuild.scalatestMatchersCoreNative
lazy val scalatestShouldMatchersNative = ScalatestBuild.scalatestShouldMatchersNative
lazy val scalatestMustMatchersNative = ScalatestBuild.scalatestMustMatchersNative
Expand Down Expand Up @@ -175,6 +184,9 @@ lazy val scalatestWordSpecDottyNative = ScalatestBuild.scalatestWordSpecDottyNat
lazy val scalatestDiagramsDotty = ScalatestBuild.scalatestDiagramsDotty
lazy val scalatestDiagramsDottyJS = ScalatestBuild.scalatestDiagramsDottyJS
lazy val scalatestDiagramsDottyNative = ScalatestBuild.scalatestDiagramsDottyNative
lazy val scalatestExpectationsDotty = ScalatestBuild.scalatestExpectationsDotty
lazy val scalatestExpectationsDottyJS = ScalatestBuild.scalatestExpectationsDottyJS
lazy val scalatestExpectationsDottyNative = ScalatestBuild.scalatestExpectationsDottyNative
lazy val scalatestMatchersCoreDotty = ScalatestBuild.scalatestMatchersCoreDotty
lazy val scalatestMatchersCoreDottyJS = ScalatestBuild.scalatestMatchersCoreDottyJS
lazy val scalatestMatchersCoreDottyNative = ScalatestBuild.scalatestMatchersCoreDottyNative
Expand Down
77 changes: 75 additions & 2 deletions project/DottyBuild.scala
Expand Up @@ -575,7 +575,37 @@ trait DottyBuild { this: BuildCommons =>
"org.scalatest",
"org.scalatest.diagrams"
),
).dependsOn(scalatestCoreDottyNative).enablePlugins(ScalaNativePlugin)
).dependsOn(scalatestCoreDottyNative).enablePlugins(ScalaNativePlugin)

lazy val scalatestExpectationsDotty = project.in(file("dotty/expectations"))
.scalatestModule("scalatest-expectations", "ScalaTest Expectations Dotty")
.dependsOn(
scalatestCoreDotty
)

lazy val scalatestExpectationsDottyJS = project.in(file("dotty/expectations.js"))
.scalatestSubModule(
"scalatest-expectations",
"ScalaTest Expectations Dotty JS",
(targetDir, version, scalaVersion) =>
GenScalaTestDotty.genExpectationsScalaJS(targetDir / "org" / "scalatest", version, scalaVersion)
).settings(
OsgiKeys.exportPackage := Seq(
"org.scalatest.expectations"
),
).dependsOn(scalatestCoreDottyJS).enablePlugins(ScalaJSPlugin)

lazy val scalatestExpectationsDottyNative = project.in(file("dotty/expectations.native"))
.scalatestSubModule(
"scalatest-expectations",
"ScalaTest Expectations Dotty Native",
(targetDir, version, scalaVersion) =>
GenScalaTestDotty.genExpectationsScalaNative(targetDir / "org" / "scalatest", version, scalaVersion)
).settings(
OsgiKeys.exportPackage := Seq(
"org.scalatest.expectations"
),
).dependsOn(scalatestCoreDottyNative).enablePlugins(ScalaNativePlugin)

lazy val scalatestMatchersCoreDotty = project.in(file("dotty/matchers-core"))
.scalatestSubModule(
Expand Down Expand Up @@ -705,6 +735,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDotty,
scalatestWordSpecDotty,
scalatestDiagramsDotty,
scalatestExpectationsDotty,
scalatestMatchersCoreDotty,
scalatestShouldMatchersDotty,
scalatestMustMatchersDotty
Expand All @@ -730,6 +761,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDotty,
scalatestWordSpecDotty,
scalatestDiagramsDotty,
scalatestExpectationsDotty,
scalatestMatchersCoreDotty,
scalatestShouldMatchersDotty,
scalatestMustMatchersDotty
Expand All @@ -744,6 +776,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDotty,
scalatestWordSpecDotty,
scalatestDiagramsDotty,
scalatestExpectationsDotty,
scalatestMatchersCoreDotty,
scalatestShouldMatchersDotty,
scalatestMustMatchersDotty
Expand All @@ -769,6 +802,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDottyJS,
scalatestWordSpecDottyJS,
scalatestDiagramsDottyJS,
scalatestExpectationsDottyJS,
scalatestMatchersCoreDottyJS,
scalatestShouldMatchersDottyJS,
scalatestMustMatchersDottyJS
Expand All @@ -783,6 +817,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDottyJS,
scalatestWordSpecDottyJS,
scalatestDiagramsDottyJS,
scalatestExpectationsDottyJS,
scalatestMatchersCoreDottyJS,
scalatestShouldMatchersDottyJS,
scalatestMustMatchersDottyJS
Expand All @@ -808,6 +843,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDottyNative,
scalatestWordSpecDottyNative,
scalatestDiagramsDottyNative,
scalatestExpectationsDottyNative,
scalatestMatchersCoreDottyNative,
scalatestShouldMatchersDottyNative,
scalatestMustMatchersDottyNative
Expand All @@ -822,6 +858,7 @@ trait DottyBuild { this: BuildCommons =>
scalatestRefSpecDottyNative,
scalatestWordSpecDottyNative,
scalatestDiagramsDottyNative,
scalatestExpectationsDottyNative,
scalatestMatchersCoreDottyNative,
scalatestShouldMatchersDottyNative,
scalatestMustMatchersDottyNative
Expand Down Expand Up @@ -962,6 +999,7 @@ trait DottyBuild { this: BuildCommons =>
}.taskValue,
).dependsOn(commonTestDotty % "test").aggregate(
scalatestDiagramsTestDotty,
scalatestExpectationsTestDotty,
scalatestFeatureSpecTestDotty,
scalatestFlatSpecTestDotty,
scalatestFreeSpecTestDotty,
Expand Down Expand Up @@ -1008,6 +1046,7 @@ trait DottyBuild { this: BuildCommons =>
).dependsOn(scalacticDottyJS, scalatestDottyJS % "test", commonTestDottyJS % "test").enablePlugins(ScalaJSPlugin)
.aggregate(
scalatestDiagramsTestDottyJS,
scalatestExpectationsTestDottyJS,
scalatestFeatureSpecTestDottyJS,
scalatestFlatSpecTestDottyJS,
scalatestFreeSpecTestDottyJS,
Expand All @@ -1030,6 +1069,7 @@ trait DottyBuild { this: BuildCommons =>
).dependsOn(scalacticDottyNative, scalatestDottyNative % "test", commonTestDottyNative % "test").enablePlugins(ScalaNativePlugin)
.aggregate(
scalatestDiagramsTestDottyNative,
scalatestExpectationsTestDottyNative,
scalatestFeatureSpecTestDottyNative,
scalatestFlatSpecTestDottyNative,
scalatestFreeSpecTestDottyNative,
Expand Down Expand Up @@ -1071,7 +1111,40 @@ trait DottyBuild { this: BuildCommons =>
Test / sourceGenerators += Def.task {
GenScalaTestDotty.genDiagramsTestNative((Test / sourceManaged).value, version.value, scalaVersion.value)
}.taskValue,
).dependsOn(commonTestDottyNative % "test").enablePlugins(ScalaNativePlugin)
).dependsOn(commonTestDottyNative % "test").enablePlugins(ScalaNativePlugin)

lazy val scalatestExpectationsTestDotty = project.in(file("dotty/expectations-test"))
.settings(sharedSettings: _*)
.settings(dottySettings: _*)
.settings(sharedTestSettingsDotty)
.settings(
projectTitle := "ScalaTest Expectations Test",
Test / sourceGenerators += Def.task {
GenScalaTestDotty.genExpectationsTest((Test / sourceManaged).value, version.value, scalaVersion.value)
}.taskValue,
).dependsOn(commonTestDotty % "test")

lazy val scalatestExpectationsTestDottyJS = project.in(file("dotty/expectations-test.js"))
.settings(sharedSettings: _*)
.settings(dottySettings: _*)
.settings(sharedTestSettingsDottyJS)
.settings(
projectTitle := "ScalaTest Expectations Test",
Test / sourceGenerators += Def.task {
GenScalaTestDotty.genExpectationsTestJS((Test / sourceManaged).value, version.value, scalaVersion.value)
}.taskValue,
).dependsOn(commonTestDottyJS % "test").enablePlugins(ScalaJSPlugin)

lazy val scalatestExpectationsTestDottyNative = project.in(file("dotty/expectations-test.native"))
.settings(sharedSettings: _*)
.settings(dottySettings: _*)
.settings(sharedTestSettingsNative)
.settings(
projectTitle := "ScalaTest Expectations Test",
Test / sourceGenerators += Def.task {
GenScalaTestDotty.genExpectationsTestNative((Test / sourceManaged).value, version.value, scalaVersion.value)
}.taskValue,
).dependsOn(commonTestDottyNative % "test").enablePlugins(ScalaNativePlugin)

lazy val scalatestFeatureSpecTestDotty = project.in(file("dotty/featurespec-test"))
.settings(sharedSettings: _*)
Expand Down
12 changes: 10 additions & 2 deletions project/GenModulesJS.scala
Expand Up @@ -62,7 +62,6 @@ object GenModulesJS {
"org/scalatest/concurrent",
"org/scalatest/enablers",
"org/scalatest/exceptions",
"org/scalatest/expectations",
"org/scalatest/events",
"org/scalatest/fixture",
"org/scalatest/prop",
Expand Down Expand Up @@ -146,7 +145,16 @@ object GenModulesJS {
).contains(packagePath)
}.flatMap { case (packagePath, skipList) =>
copyDir("jvm/diagrams/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
}.toList
}.toList

def genScalaTestExpectations(targetDir: File, version: String, scalaVersion: String): Seq[File] =
GenScalaTestJS.genScalaPackages.filter { case (packagePath, skipList) =>
List(
"org/scalatest/expectations"
).contains(packagePath)
}.flatMap { case (packagePath, skipList) =>
copyDir("jvm/expectations/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
}.toList

def genScalaTestMatchersCore(targetDir: File, version: String, scalaVersion: String): Seq[File] =
GenScalaTestJS.genScalaPackages.filter { case (packagePath, skipList) =>
Expand Down
12 changes: 10 additions & 2 deletions project/GenModulesNative.scala
Expand Up @@ -55,7 +55,6 @@ object GenModulesNative {
"org/scalatest/concurrent",
"org/scalatest/enablers",
"org/scalatest/exceptions",
"org/scalatest/expectations",
"org/scalatest/events",
"org/scalatest/fixture",
"org/scalatest/prop",
Expand Down Expand Up @@ -139,7 +138,16 @@ object GenModulesNative {
).contains(packagePath)
}.flatMap { case (packagePath, skipList) =>
copyDir("jvm/diagrams/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
}.toList
}.toList

def genScalaTestExpectations(targetDir: File, version: String, scalaVersion: String): Seq[File] =
GenScalaTestNative.genScalaPackages.filter { case (packagePath, skipList) =>
List(
"org/scalatest/expectations"
).contains(packagePath)
}.flatMap { case (packagePath, skipList) =>
copyDir("jvm/expectations/src/main/scala/" + packagePath, packagePath, targetDir, skipList)
}.toList

def genScalaTestMatchersCore(targetDir: File, version: String, scalaVersion: String): Seq[File] =
GenScalaTestNative.genScalaPackages.filter { case (packagePath, skipList) =>
Expand Down

0 comments on commit e66aebf

Please sign in to comment.