Skip to content

Commit 0e01a08

Browse files
Address compilation warnings (#1452)
1 parent ab05d82 commit 0e01a08

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

modules/integration/src/test/scala/scala/cli/integration/DefaultTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ class DefaultTests extends ScalaCliSuite {
143143
"-classpath",
144144
(os.rel / compilationOutputDir).toString
145145
).call(cwd = root, mergeErrIntoOut = true)
146-
expect(runRes.out.trim == replDryRunOutput)
146+
expect(runRes.out.trim() == replDryRunOutput)
147147
}
148148
}
149149

150150
test("ensure --help-native works with the default command") {
151151
TestInputs.empty.fromRoot { root =>
152152
val res = os.proc(TestUtil.cli, "--help-native").call(cwd = root)
153-
expect(res.out.trim.contains("Scala Native options:"))
153+
expect(res.out.trim().contains("Scala Native options:"))
154154
}
155155
}
156156

157157
test("ensure --help-js works with the default command") {
158158
TestInputs.empty.fromRoot { root =>
159159
val res = os.proc(TestUtil.cli, "--help-js").call(cwd = root)
160-
expect(res.out.trim.contains("Scala.js options:"))
160+
expect(res.out.trim().contains("Scala.js options:"))
161161
}
162162
}
163163

modules/integration/src/test/scala/scala/cli/integration/RunTestDefinitions.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
23292329
preCompileOutputDir.toString,
23302330
extraOptions
23312331
).call(cwd = root / preCompileDir, stderr = os.Pipe)
2332-
expect(!compileRes.err.trim.contains("Warning: Flag -d set repeatedly"))
2332+
expect(!compileRes.err.trim().contains("Warning: Flag -d set repeatedly"))
23332333

23342334
// next, run while relying on the pre-compiled class, specifying the path with -O -classpath
23352335
val runRes = os.proc(
@@ -2342,7 +2342,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
23422342
(os.rel / os.up / preCompileDir / preCompileOutputDir).toString,
23432343
extraOptions
23442344
).call(cwd = root / runDir, stderr = os.Pipe)
2345-
expect(!runRes.err.trim.contains("Warning: Flag -classpath set repeatedly"))
2345+
expect(!runRes.err.trim().contains("Warning: Flag -classpath set repeatedly"))
23462346
expect(runRes.out.trim() == expectedOutput)
23472347
}
23482348
}
@@ -2400,7 +2400,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
24002400
jarPath,
24012401
extraOptions
24022402
).call(cwd = root)
2403-
expect(runRes.out.trim == expectedOutput)
2403+
expect(runRes.out.trim() == expectedOutput)
24042404
}
24052405
}
24062406

@@ -2430,7 +2430,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
24302430
jarParentDirectory,
24312431
extraOptions
24322432
).call(cwd = root)
2433-
expect(runRes.out.trim == expectedOutput)
2433+
expect(runRes.out.trim() == expectedOutput)
24342434
}
24352435
}
24362436

@@ -2482,7 +2482,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
24822482
val res =
24832483
os.proc(TestUtil.cli, "run", ".", "-S", scala212VersionString, TestUtil.extraOptions)
24842484
.call(cwd = root)
2485-
expect(res.out.trim == scala212VersionString)
2485+
expect(res.out.trim() == scala212VersionString)
24862486
}
24872487
}
24882488
}
@@ -2529,12 +2529,12 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
25292529
.fromRoot { root =>
25302530
val res = os.proc(TestUtil.cli, ".", "--scalac-verbose", extraOptions)
25312531
.call(cwd = root, stderr = os.Pipe)
2532-
val errLines = res.err.trim.lines.toList.asScala
2532+
val errLines = res.err.trim().lines.toList.asScala
25332533
// there should be a lot of logs, but different stuff is logged depending on the Scala version
25342534
expect(errLines.length > 100)
25352535
expect(errLines.exists(_.startsWith("[loaded package loader scala")))
25362536
expect(errLines.exists(_.contains(s"$mainClass.scala")))
2537-
expect(res.out.trim == expectedOutput)
2537+
expect(res.out.trim() == expectedOutput)
25382538
}
25392539
}
25402540

@@ -2552,7 +2552,7 @@ abstract class RunTestDefinitions(val scalaVersionOpt: Option[String])
25522552
"cp1252",
25532553
extraOptions
25542554
).call(cwd = root)
2555-
expect(res.out.trim == "")
2555+
expect(res.out.trim() == "")
25562556
}
25572557
}
25582558
}

0 commit comments

Comments
 (0)