Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit 44e4ff0

Browse files
committed
Compiles with -Ywarn-unused
1 parent 774fc24 commit 44e4ff0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main/scala/scala/tools/partest/nest/AbstractRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ abstract class AbstractRunner {
173173
val num = paths.size
174174
val ss = if (num == 1) "" else "s"
175175
comment(s"starting $num test$ss in $kind")
176-
val results = suiteRunner.runTestsForFiles(paths map (_.jfile.getAbsoluteFile), kind)
176+
val results = suiteRunner.runTestsForFiles(paths map (_.jfile.getAbsoluteFile))
177177
val (passed, failed) = results partition (_.isOk)
178178

179179
passedTests ++= passed

src/main/scala/scala/tools/partest/nest/AntRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class AntRunner(srcDir: String, testClassLoader: URLClassLoader, javaCm
3333
else {
3434
log(s"Running ${files.length} tests in '$kind' at $now")
3535
// log(s"Tests: ${files.toList}")
36-
val results = runTestsForFiles(files, kind)
36+
val results = runTestsForFiles(files)
3737
val (passed, failed) = results partition (_.isOk)
3838
val numPassed = passed.size
3939
val numFailed = failed.size

src/main/scala/scala/tools/partest/nest/Runner.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
9393
System.err.println(stackTraceString(t))
9494
}
9595
protected def crashHandler: PartialFunction[Throwable, TestState] = {
96-
case t: InterruptedException =>
96+
case _: InterruptedException =>
9797
genTimeout()
9898
case t: Throwable =>
9999
showCrashInfo(t)
@@ -209,7 +209,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
209209
val p = Process(args) run pl
210210
try p.exitValue
211211
catch {
212-
case e: InterruptedException =>
212+
case _: InterruptedException =>
213213
nestUI.verbose(s"Interrupted waiting for command to finish (${args mkString " "})")
214214
p.destroy
215215
nonzero
@@ -312,7 +312,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner, val nestUI: NestU
312312

313313
"\n" + diff
314314
}
315-
catch { case t: Exception => None }
315+
catch { case _: Exception => None }
316316
}
317317

318318
/** Normalize the log output by applying test-specific filters
@@ -759,7 +759,7 @@ class SuiteRunner(
759759
// |Java Classpath: ${sys.props("java.class.path")}
760760
}
761761

762-
def onFinishTest(testFile: File, result: TestState): TestState = result
762+
def onFinishTest(@deprecated("unused","") testFile: File, result: TestState): TestState = result
763763

764764
def runTest(testFile: File): TestState = {
765765
val runner = new Runner(testFile, this, nestUI)
@@ -782,7 +782,7 @@ class SuiteRunner(
782782
onFinishTest(testFile, state)
783783
}
784784

785-
def runTestsForFiles(kindFiles: Array[File], kind: String): Array[TestState] = {
785+
def runTestsForFiles(kindFiles: Array[File]): Array[TestState] = {
786786
nestUI.resetTestNumber(kindFiles.size)
787787

788788
val pool = Executors.newFixedThreadPool(numThreads)
@@ -795,7 +795,7 @@ class SuiteRunner(
795795
case Success(_) => futures map (_.get)
796796
case Failure(e) =>
797797
e match {
798-
case TimeoutException(d) =>
798+
case TimeoutException(_) =>
799799
nestUI.warning("Thread pool timeout elapsed before all tests were complete!")
800800
case ie: InterruptedException =>
801801
nestUI.warning("Thread pool was interrupted")

0 commit comments

Comments
 (0)