Minor: don't use StringBuilder#setLength(0) - absent in JS

This commit is contained in:
Dmitry Petrov
2017-07-07 14:24:46 +03:00
parent 0962aec456
commit dd5bb78178
4 changed files with 8 additions and 8 deletions
@@ -1,9 +1,9 @@
// WITH_RUNTIME
val order = StringBuilder()
var order = StringBuilder()
inline fun expectOrder(at: String, expected: String, body: () -> Unit) {
order.setLength(0)
order = StringBuilder() // have to do that in order to run this test in JS
body()
if (order.toString() != expected) throw AssertionError("$at: expected: $expected, actual: $order")
}