Skip to content

Commit 07bbcab

Browse files
committed
Scala 3 support; Scoverage v2.0.7
Unit test for Scala 3 - picks up wrong Scala 2 compiler - push to ask for help
1 parent 4c2e1bf commit 07bbcab

File tree

5 files changed

+38
-1
lines changed

5 files changed

+38
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package org.scoverage;
2+
3+
public class Scala32Test extends ScalaVersionTest {
4+
5+
public Scala32Test() { super("3_2"); }
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dependencies {
2+
implementation 'org.scala-lang:scala3-library_3:3.2.0'
3+
testImplementation 'org.scalatest:scalatest_3:3.2.14'
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.hello
2+
3+
class World3_2 {
4+
5+
// Scala 3 enum to force Scala 3 (Dotty) compiler
6+
enum Num(val value: String):
7+
case Three extends Num("3")
8+
case Two extends Num("2")
9+
10+
def foo(): String = {
11+
val s = Num.Three.value + Num.Two.value
12+
s
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.hello
2+
3+
import org.junit.runner.RunWith
4+
import org.scalatest.FunSuite
5+
import org.scalatest.junit.JUnitRunner
6+
7+
@RunWith(classOf[JUnitRunner])
8+
class World3_2Suite extends FunSuite {
9+
10+
test("foo") {
11+
new World3_2().foo()
12+
}
13+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include '2_12', '2_13'
1+
include '2_12', '2_13', '3_2'

0 commit comments

Comments
 (0)