Skip to content

Commit

Permalink
Debugger tests: specify expression for evaluate expression test when …
Browse files Browse the repository at this point in the history
…test failed
  • Loading branch information
NataliaUkhorskaya committed Apr 23, 2014
1 parent fa482bc commit 084c72f
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -41,21 +41,21 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestC
createDebugProcess(path)

onBreakpoint {
val exceptions = arrayListOf<Throwable>()
val exceptions = linkedMapOf<String, Throwable>()
for ((i, expression) in expressions.withIndices()) {
try {
evaluate(expression, expectedResults[i])
}
catch (e: Throwable) {
exceptions.add(e)
exceptions.put(expression, e)
}
}

if (exceptions.notEmpty) {
for (exc in exceptions) {
if (!exceptions.empty) {
for (exc in exceptions.values()) {
exc.printStackTrace()
}
throw AssertionError("Test failed:\n" + exceptions.map { it.getMessage() }.makeString("\n"))
throw AssertionError("Test failed:\n" + exceptions.map { "expression: ${it.key}, exception: ${it.value.getMessage()}" }.makeString("\n"))
}
}
finish()
Expand Down

0 comments on commit 084c72f

Please sign in to comment.