Refactor REPL tests: use empty line instead of "null"
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
>>> fun foo() = 765
|
||||
null
|
||||
>>> foo(1)
|
||||
ERROR: /line2.kts: (1, 5) Too many arguments for internal final fun foo(): kotlin.Int defined in <script>
|
||||
>>> foo()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
>>>
|
||||
null
|
||||
>>> 101
|
||||
101
|
||||
>>>
|
||||
null
|
||||
>>> 102
|
||||
102
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
>>> throw Exception("hi there")
|
||||
substring: Exception: hi there
|
||||
>>> fun foo() = 2
|
||||
null
|
||||
>>> foo()
|
||||
2
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
>>> fun foo() = 2
|
||||
null
|
||||
>>> foo()
|
||||
2
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
>>> fun foo() = 10
|
||||
null
|
||||
>>> fun foo() = 11
|
||||
null
|
||||
>>> foo()
|
||||
11
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
>>> fun foo(s: String) = "string"
|
||||
null
|
||||
>>> fun foo(a: Any) = "any"
|
||||
null
|
||||
>>> foo("a")
|
||||
any
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
>>> val x = 1
|
||||
null
|
||||
>>> fun add1(y: Int) = x + y
|
||||
null
|
||||
>>> add1(999999)
|
||||
1000000
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
>>> import java.io.ByteArrayOutputStream
|
||||
null
|
||||
>>> val s = ByteArrayOutputStream()
|
||||
null
|
||||
>>> s.javaClass!!.getName()
|
||||
java.io.ByteArrayOutputStream
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
>>> fun clock() =
|
||||
incomplete
|
||||
>>> 12
|
||||
null
|
||||
>>> clock()
|
||||
12
|
||||
|
||||
@@ -5,6 +5,5 @@ incomplete
|
||||
>>> 2 +
|
||||
incomplete
|
||||
>>> 1
|
||||
null
|
||||
>>> get7()
|
||||
7
|
||||
|
||||
@@ -2,6 +2,5 @@
|
||||
ERROR: /line1.kts: (1, 1) Expecting an element
|
||||
ERROR: /line1.kts: (1, 3) Expecting an expression
|
||||
>>> fun foo() = 98
|
||||
null
|
||||
>>> foo()
|
||||
98
|
||||
|
||||
@@ -116,7 +116,7 @@ public abstract class AbstractReplInterpreterTest extends UsefulTestCase {
|
||||
else {
|
||||
actual = lineResult.getErrorText();
|
||||
}
|
||||
String actualString = StringUtil.convertLineSeparators(actual != null ? actual.toString() : "null").replaceFirst("\n$", "");
|
||||
String actualString = StringUtil.convertLineSeparators(actual != null ? actual.toString() : "").replaceFirst("\n$", "");
|
||||
|
||||
if (line.matchType == MatchType.EQUALS) {
|
||||
Assert.assertEquals("after evaluation of: " + line.code, expected, actualString);
|
||||
|
||||
Reference in New Issue
Block a user