-
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.
Duplicate scala3 coverage excluded tests for scala 3.3.4
- Loading branch information
Showing
12 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/sbt-test/scoverage/scala3.3.4-coverage-excluded-files/build.sbt
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version := "0.1" | ||
|
||
scalaVersion := "3.3.4" | ||
|
||
libraryDependencies += "org.scalameta" %% "munit" % "1.0.1" % Test | ||
|
||
coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*" | ||
|
||
resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Resolver.sonatypeOssRepos("snapshots") | ||
else Seq.empty | ||
} |
7 changes: 7 additions & 0 deletions
7
src/sbt-test/scoverage/scala3.3.4-coverage-excluded-files/src/main/scala/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...test/scoverage/scala3.3.4-coverage-excluded-files/src/main/scala/three/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package three | ||
|
||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...t-test/scoverage/scala3.3.4-coverage-excluded-files/src/main/scala/two/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package two | ||
|
||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...t-test/scoverage/scala3.3.4-coverage-excluded-files/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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import munit.FunSuite | ||
|
||
/** Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends FunSuite { | ||
|
||
test("GoodCoverage should sum two numbers") { | ||
assertEquals(GoodCoverage.sum(1, 2), 3) | ||
assertEquals(GoodCoverage.sum(0, 3), 3) | ||
assertEquals(GoodCoverage.sum(3, 0), 3) | ||
} | ||
|
||
test("two.GoodCoverage should sum two numbers") { | ||
assertEquals(two.GoodCoverage.sum(1, 2), 3) | ||
assertEquals(two.GoodCoverage.sum(0, 3), 3) | ||
assertEquals(two.GoodCoverage.sum(3, 0), 3) | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
src/sbt-test/scoverage/scala3.3.4-coverage-excluded-files/test
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# run scoverage using the coverage task | ||
> clean | ||
> coverage | ||
> test | ||
> coverageReport | ||
# There should be no directory for the excluded files | ||
$ exists target/scala-3.3.4/scoverage-report/GoodCoverage.scala.html | ||
-$ exists target/scala-3.3.4/scoverage-report/two | ||
-$ exists target/scala-3.3.4/scoverage-report/three |
13 changes: 13 additions & 0 deletions
13
src/sbt-test/scoverage/scala3.3.4-coverage-excluded-packages/build.sbt
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version := "0.1" | ||
|
||
scalaVersion := "3.3.4" | ||
|
||
libraryDependencies += "org.scalameta" %% "munit" % "1.0.1" % Test | ||
|
||
coverageExcludedPackages := "two\\..*;three\\..*" | ||
|
||
resolvers ++= { | ||
if (sys.props.get("plugin.version").exists(_.endsWith("-SNAPSHOT"))) | ||
Resolver.sonatypeOssRepos("snapshots") | ||
else Seq.empty | ||
} |
7 changes: 7 additions & 0 deletions
7
...bt-test/scoverage/scala3.3.4-coverage-excluded-packages/src/main/scala/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...t/scoverage/scala3.3.4-coverage-excluded-packages/src/main/scala/three/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package three | ||
|
||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
...est/scoverage/scala3.3.4-coverage-excluded-packages/src/main/scala/two/GoodCoverage.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package two | ||
|
||
object GoodCoverage { | ||
|
||
def sum(num1: Int, num2: Int) = { | ||
if (0 == num1) num2 else if (0 == num2) num1 else num1 + num2 | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...est/scoverage/scala3.3.4-coverage-excluded-packages/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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import munit.FunSuite | ||
|
||
/** Created by tbarke001c on 7/8/14. | ||
*/ | ||
class GoodCoverageSpec extends FunSuite { | ||
|
||
test("GoodCoverage should sum two numbers") { | ||
assertEquals(GoodCoverage.sum(1, 2), 3) | ||
assertEquals(GoodCoverage.sum(0, 3), 3) | ||
assertEquals(GoodCoverage.sum(3, 0), 3) | ||
} | ||
|
||
test("two.GoodCoverage should sum two numbers") { | ||
assertEquals(two.GoodCoverage.sum(1, 2), 3) | ||
assertEquals(two.GoodCoverage.sum(0, 3), 3) | ||
assertEquals(two.GoodCoverage.sum(3, 0), 3) | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
src/sbt-test/scoverage/scala3.3.4-coverage-excluded-packages/test
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# run scoverage using the coverage task | ||
> clean | ||
> coverage | ||
> test | ||
> coverageReport | ||
# There should be no directory for the excluded package | ||
$ exists target/scala-3.3.4/scoverage-report/GoodCoverage.scala.html | ||
-$ exists target/scala-3.3.4/scoverage-report/two | ||
-$ exists target/scala-3.3.4/scoverage-report/three |