Skip to content

Commit 734b3f3

Browse files
committed
Fix NormMethodsSpec for Dotty
1 parent ef9b159 commit 734b3f3

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

project/GenScalacticDotty.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ object GenScalacticDotty {
149149
def genTest(targetDir: File, version: String, scalaVersion: String): Seq[File] =
150150
copyDir("scalactic-test/src/test/scala/org/scalactic", "org/scalactic", targetDir,
151151
List(
152-
"NormMethodsSpec.scala", // Compilation error to be investigated further.
153152
"OrSpec.scala", // Compilation error to be investigated further.
154153
"PrettifierSpec.scala", // Test failed with java.lang.IllegalAccessException
155154
"RequirementsSpec.scala", // Error during macro expansion

scalactic-test/src/test/scala/org/scalactic/NormMethodsSpec.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ class NormMethodsSpec extends FunSpec with StringNormalizations with NormMethods
2121

2222
describe("trait NormMethods") {
2323
it("should provide a .norm method for any type T for which an implicit Normalization[T] is available") {
24-
24+
2525
{ // Try with lowerCased
26-
implicit val strNorm = lowerCased
26+
implicit val strNorm: Normalization[String] = lowerCased
2727
assert("Hello".norm === "hello")
2828
assert("hello".norm === "hello")
2929
assert("".norm === "")
3030
assert("HELLO".norm === "hello")
3131
}
3232

3333
{ // Try with trimmed
34-
implicit val strNorm = trimmed
34+
implicit val strNorm: Normalization[String] = trimmed
3535
assert("hello".norm === "hello")
3636
assert(" hello".norm === "hello")
3737
assert("hello ".norm === "hello")
@@ -43,15 +43,15 @@ class NormMethodsSpec extends FunSpec with StringNormalizations with NormMethods
4343
}
4444

4545
{ // Try with upperCased
46-
implicit val strNorm = upperCased
46+
implicit val strNorm: Normalization[String] = upperCased
4747
assert("Hello".norm === "HELLO")
4848
assert("hello".norm === "HELLO")
4949
assert("".norm === "")
5050
assert("HELLO".norm === "HELLO")
5151
}
5252

5353
{ // Try with a type other than String
54-
implicit val intNorm =
54+
implicit val intNorm: Normalization[Int] =
5555
new Normalization[Int] {
5656
def normalized(i: Int) = i.abs
5757
}

0 commit comments

Comments
 (0)