Skip to content

Commit 9ff138a

Browse files
socadriaanm
authored andcommitted
ConsoleRunner: --> now returns Boolean, not Unit
1 parent 1974f25 commit 9ff138a

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ class ConsoleRunner(argstr: String) extends {
9393
}
9494

9595
def run(): Unit = {
96-
if (optDebug) NestUI.setDebug()
97-
if (optVerbose) NestUI.setVerbose()
98-
if (optTerse) NestUI.setTerse()
99-
if (optShowDiff) NestUI.setDiffOnFail()
100-
10196
// Early return on no args, version, or invalid args
10297
if (optVersion) return echo(versionMsg)
10398
if (optHelp) return NestUI.usage()
@@ -184,7 +179,7 @@ class ConsoleRunner(argstr: String) extends {
184179
issueSummaryReport()
185180
System exit ( if (isSuccess) 0 else 1 )
186181
}
187-
182+
188183
run()
189184
}
190185

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ trait ConsoleRunnerSpec extends Spec with Meta.StdOpts with Interpolation {
3535
val optSourcePath = "srcpath" / "set (relative) path to test source files (ex.: --srcpath pending)" --|
3636

3737
heading("Test output options:")
38-
val optShowDiff = "show-diff" / "show diffs for failed tests" --?
39-
val optVerbose = "verbose" / "show verbose progress information" --?
40-
val optTerse = "terse" / "show terse progress information" --?
41-
val optDebug = "debug" / "enable debugging output" --?
38+
val optShowDiff = "show-diff" / "show diffs for failed tests" --> NestUI.setDiffOnFail()
39+
val optVerbose = "verbose" / "show verbose progress information" --> NestUI.setVerbose()
40+
val optTerse = "terse" / "show terse progress information" --> NestUI.setTerse()
41+
val optDebug = "debug" / "enable debugging output" --> NestUI.setDebug()
4242

4343
heading("Other options:")
4444
val optVersion = "version" / "show Scala version and exit" --?

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class Colors(enabled: => Boolean) {
2828
object NestUI {
2929
private val testNum = new java.util.concurrent.atomic.AtomicInteger(1)
3030
@volatile private var testNumberFmt = "%3d"
31-
// @volatile private var testNumber = 1
3231
private def testNumber = testNumberFmt format testNum.getAndIncrement()
3332
def resetTestNumber(max: Int = -1) {
3433
testNum set 1

0 commit comments

Comments
 (0)