clever toString()

This commit is contained in:
Bruce Eckel 2016-07-14 18:18:02 -06:00
parent 33db5aa10d
commit fd2593b975

View File

@ -6,7 +6,7 @@ class Tags {
Boolean throwsException = false Boolean throwsException = false
Boolean errorOutputExpected = false Boolean errorOutputExpected = false
Boolean validateByHand = false Boolean validateByHand = false
Boolean ignoreOutput = false // probably don't need this tag Boolean ignoreOutput = false // This tag isn't used in the build...
String fileRoot String fileRoot
String mainClass String mainClass
String javaCmd = null String javaCmd = null
@ -76,29 +76,25 @@ class Tags {
result += ln + "\n" result += ln + "\n"
else else
break break
if(mainMethod) """
result += "mainMethod: " + mainMethod + "\n" mainMethod
if(compileTimeError) compileTimeError
result += "compileTimeError: " + compileTimeError + "\n" throwsException
if(throwsException) errorOutputExpected
result += "throwsException: " + throwsException + "\n" validateByHand
if(errorOutputExpected) ignoreOutput
result += "errorOutputExpected: " + errorOutputExpected + "\n" fileRoot
if(validateByHand) mainClass
result += "validateByHand: " + validateByHand + "\n" javaCmd
if(ignoreOutput) args
result += "ignoreOutput: " + ignoreOutput + "\n" jVMArgs
if(javaCmd) exec
result += "javaCmd: " + javaCmd + "\n" runFirst
if(args) """.split().each { str ->
result += "args: " + args + "\n" if(this[str])
if(jVMArgs) result += str + ": " + this[str] + "\n"
result += "jVMArgs: " + jVMArgs + "\n" }
if(exec) result
result += "exec: " + exec + "\n"
if(runFirst)
result += "runFirst: " + runFirst + "\n"
return result
} }
} }