-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #347 from ckipp01/scripted
Update tests in scripted.
- Loading branch information
Showing
23 changed files
with
137 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
/* | ||
The projects test aggregation of coverage reports from two sub-projects. | ||
The sub-projects are in the directories partA and partB. | ||
*/ | ||
*/ | ||
|
||
lazy val commonSettings = Seq( | ||
organization := "org.scoverage", | ||
version := "0.1.0", | ||
scalaVersion := "2.12.13" | ||
scalaVersion := "2.13.5" | ||
) | ||
|
||
lazy val specs2Lib = "org.specs2" %% "specs2" % "2.5" % "test" | ||
|
||
def module(name: String) = { | ||
val id = s"part$name" | ||
Project(id = id, base = file(id)) | ||
.settings(commonSettings: _*) | ||
.settings( | ||
Keys.name := name, | ||
libraryDependencies += specs2Lib | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test | ||
) | ||
} | ||
|
||
lazy val partA = module("A") | ||
lazy val partB = module("B") | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(commonSettings:_*) | ||
.settings(commonSettings: _*) | ||
.settings( | ||
name := "root", | ||
test := { } | ||
).aggregate( | ||
test := {} | ||
) | ||
.aggregate( | ||
partA, | ||
partB | ||
) | ||
|
||
ThisBuild / resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) Seq(Resolver.sonatypeRepo("snapshots")) | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Seq(Resolver.sonatypeRepo("snapshots")) | ||
else Seq.empty | ||
} |
15 changes: 6 additions & 9 deletions
15
src/sbt-test/scoverage/aggregate-only/partA/src/test/scala/AdderTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
import org.scoverage.issue53.part.a.AdderScala | ||
|
||
/** | ||
* Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class AdderTestSuite extends Specification { | ||
"Adder" should { | ||
"sum two numbers" in { | ||
AdderScala.add(1, 2) mustEqual 3 | ||
} | ||
/** Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class AdderTestSuite extends FunSuite { | ||
test("Adder should sum two numbers") { | ||
assertEquals(AdderScala.add(1, 2), 3) | ||
} | ||
} |
16 changes: 6 additions & 10 deletions
16
src/sbt-test/scoverage/aggregate-only/partB/src/test/scala/SubtractorTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
import org.scoverage.issue53.part.b.SubtractorScala | ||
|
||
/** | ||
* Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class SubtractorTestSuite extends Specification { | ||
"Subtractor" should { | ||
"subtract two numbers" in { | ||
SubtractorScala.minus(2, 1) mustEqual 1 | ||
} | ||
/** Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class SubtractorTestSuite extends FunSuite { | ||
test("Subtractor should subtract two numbers") { | ||
assertEquals(SubtractorScala.minus(2, 1), 1) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
/* | ||
The projects test aggregation of coverage reports from two sub-projects. | ||
The sub-projects are in the directories partA and partB. | ||
*/ | ||
*/ | ||
|
||
lazy val commonSettings = Seq( | ||
organization := "org.scoverage", | ||
version := "0.1.0", | ||
scalaVersion := "2.12.13" | ||
scalaVersion := "2.13.5" | ||
) | ||
|
||
lazy val specs2Lib = "org.specs2" %% "specs2" % "2.5" % "test" | ||
|
||
def module(name: String) = { | ||
val id = s"part$name" | ||
Project(id = id, base = file(id)) | ||
.settings(commonSettings: _*) | ||
.settings( | ||
Keys.name := name, | ||
libraryDependencies += specs2Lib | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test | ||
) | ||
} | ||
|
||
lazy val partA = module("A") | ||
lazy val partB = module("B") | ||
|
||
lazy val root = (project in file(".")) | ||
.settings(commonSettings:_*) | ||
.settings(commonSettings: _*) | ||
.settings( | ||
name := "root", | ||
test := { } | ||
).aggregate( | ||
test := {} | ||
) | ||
.aggregate( | ||
partA, | ||
partB | ||
) | ||
|
||
ThisBuild / resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) Seq(Resolver.sonatypeRepo("snapshots")) | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Seq(Resolver.sonatypeRepo("snapshots")) | ||
else Seq.empty | ||
} |
15 changes: 6 additions & 9 deletions
15
src/sbt-test/scoverage/aggregate/partA/src/test/scala/AdderTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
import org.scoverage.issue53.part.a.AdderScala | ||
|
||
/** | ||
* Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class AdderTestSuite extends Specification { | ||
"Adder" should { | ||
"sum two numbers" in { | ||
AdderScala.add(1, 2) mustEqual 3 | ||
} | ||
/** Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class AdderTestSuite extends FunSuite { | ||
test("Adder should sum two numbers") { | ||
assertEquals(AdderScala.add(1, 2), 3) | ||
} | ||
} |
16 changes: 6 additions & 10 deletions
16
src/sbt-test/scoverage/aggregate/partB/src/test/scala/SubtractorTestSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
import org.scoverage.issue53.part.b.SubtractorScala | ||
|
||
/** | ||
* Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class SubtractorTestSuite extends Specification { | ||
"Subtractor" should { | ||
"subtract two numbers" in { | ||
SubtractorScala.minus(2, 1) mustEqual 1 | ||
} | ||
/** Created by Mikhail Kokho on 7/10/2015. | ||
*/ | ||
class SubtractorTestSuite extends FunSuite { | ||
test("Subtractor should substract two numbers") { | ||
assertEquals(SubtractorScala.minus(2, 1), 1) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
version := "0.1" | ||
|
||
scalaVersion := "2.12.13" | ||
scalaVersion := "2.13.5" | ||
|
||
libraryDependencies += "org.specs2" %% "specs2" % "2.5" % "test" | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test | ||
|
||
coverageMinimum := 80 | ||
|
||
coverageFailOnMinimum := true | ||
|
||
resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) Seq(Resolver.sonatypeRepo("snapshots")) | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Seq(Resolver.sonatypeRepo("snapshots")) | ||
else Seq.empty | ||
} |
15 changes: 6 additions & 9 deletions
15
src/sbt-test/scoverage/bad-coverage/src/test/scala/BadCoverageSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
|
||
/** | ||
* Created by tbarke001c on 7/8/14. | ||
*/ | ||
class BadCoverageSpec extends Specification { | ||
/** Created by tbarke001c on 7/8/14. | ||
*/ | ||
class BadCoverageSpec extends FunSuite { | ||
|
||
"BadCoverage" should { | ||
"sum two numbers" in { | ||
BadCoverage.sum(1, 2) mustEqual 3 | ||
} | ||
test("BadCoverage should sum two numbers") { | ||
assertEquals(BadCoverage.sum(1, 2), 3) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
version := "0.1" | ||
|
||
scalaVersion := "2.12.13" | ||
scalaVersion := "2.13.5" | ||
|
||
libraryDependencies += "org.specs2" %% "specs2" % "2.5" % "test" | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test | ||
|
||
coverageMinimum := 80 | ||
|
||
coverageFailOnMinimum := true | ||
|
||
resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) Seq(Resolver.sonatypeRepo("snapshots")) | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Seq(Resolver.sonatypeRepo("snapshots")) | ||
else Seq.empty | ||
} |
15 changes: 6 additions & 9 deletions
15
src/sbt-test/scoverage/coverage-off/src/test/scala/GoodCoverageSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
|
||
/** | ||
* Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends Specification { | ||
/** Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends FunSuite { | ||
|
||
"GoodCoverage" should { | ||
"sum two numbers" in { | ||
GoodCoverage.sum(1, 2) mustEqual 3 | ||
} | ||
test("GoodCoverage should sum two numvers") { | ||
assertEquals(GoodCoverage.sum(1, 2), 3) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
version := "0.1" | ||
|
||
scalaVersion := "2.12.13" | ||
scalaVersion := "2.13.5" | ||
|
||
libraryDependencies += "org.specs2" %% "specs2" % "2.5" % "test" | ||
libraryDependencies += "org.scalameta" %% "munit" % "0.7.25" % Test | ||
|
||
coverageMinimum := 80 | ||
|
||
coverageFailOnMinimum := true | ||
|
||
resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) Seq(Resolver.sonatypeRepo("snapshots")) | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Seq(Resolver.sonatypeRepo("snapshots")) | ||
else Seq.empty | ||
} |
15 changes: 6 additions & 9 deletions
15
src/sbt-test/scoverage/good-coverage/src/test/scala/GoodCoverageSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import org.specs2.mutable._ | ||
import munit.FunSuite | ||
|
||
/** | ||
* Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends Specification { | ||
/** Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends FunSuite { | ||
|
||
"GoodCoverage" should { | ||
"sum two numbers" in { | ||
GoodCoverage.sum(1, 2) mustEqual 3 | ||
} | ||
test("GoodCoverage should sum two numbers") { | ||
assertEquals(GoodCoverage.sum(1, 2), 3) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.