REPL: call 'toString()' for returned values explicitly and correctly report exceptions
#KT-12389 Fixed
This commit is contained in:
@@ -93,7 +93,7 @@ abstract class AbstractReplInterpreterTest : KtUsefulTestCase() {
|
||||
}
|
||||
|
||||
val actual = when (lineResult) {
|
||||
is LineResult.ValueResult -> "${lineResult.value}"
|
||||
is LineResult.ValueResult -> lineResult.valueAsString
|
||||
is LineResult.Error -> lineResult.errorText
|
||||
LineResult.Incomplete -> INCOMPLETE_LINE_MESSAGE
|
||||
LineResult.UnitResult -> ""
|
||||
|
||||
@@ -59,6 +59,12 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("exceptionInValueToString.repl")
|
||||
public void testExceptionInValueToString() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/exceptionInValueToString.repl");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("function.repl")
|
||||
public void testFunction() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/function.repl");
|
||||
|
||||
Reference in New Issue
Block a user