J2K ReplInterpreter: prettify

This commit is contained in:
Alexander Udalov
2016-02-03 14:07:27 +05:30
committed by Alexander Udalov
parent 5670e7f750
commit 2e13377d4a
2 changed files with 106 additions and 158 deletions
@@ -27,7 +27,6 @@ import java.io.File
import java.io.PrintWriter
import java.util.*
import java.util.regex.Pattern
import kotlin.text.Regex
// Switch this flag to render bytecode after each line in the REPL test. Useful for debugging verify errors or other codegen problems
private val DUMP_BYTECODE = false
@@ -94,7 +93,7 @@ abstract class AbstractReplInterpreterTest : UsefulTestCase() {
val actual = when (lineResult.type) {
ReplInterpreter.LineResultType.SUCCESS -> if (!lineResult.isUnit) "${lineResult.value}" else ""
ReplInterpreter.LineResultType.RUNTIME_ERROR,
ReplInterpreter.LineResultType.COMPILE_ERROR -> lineResult.errorText
ReplInterpreter.LineResultType.COMPILE_ERROR -> lineResult.errorText!!
ReplInterpreter.LineResultType.INCOMPLETE -> INCOMPLETE_LINE_MESSAGE
}