From 084c72f91c7128386d66ba5ab74110cb8441f48c Mon Sep 17 00:00:00 2001 From: Natalia Ukhorskaya Date: Tue, 15 Apr 2014 12:53:21 +0400 Subject: [PATCH] Debugger tests: specify expression for evaluate expression test when test failed --- .../evaluate/AbstractKotlinEvaluateExpressionTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/idea/tests/org/jetbrains/jet/plugin/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt b/idea/tests/org/jetbrains/jet/plugin/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt index 05528edc8ee..c4f4d75305e 100644 --- a/idea/tests/org/jetbrains/jet/plugin/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt +++ b/idea/tests/org/jetbrains/jet/plugin/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt @@ -41,21 +41,21 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestC createDebugProcess(path) onBreakpoint { - val exceptions = arrayListOf() + val exceptions = linkedMapOf() 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()