Added regression tests for KT-2474 Range lacks reverse() in JavaScript backend
#KT-2474 Fixed
This commit is contained in:
@@ -57,4 +57,8 @@ public final class RangeTest extends SingleFileTranslationTest {
|
|||||||
public void testIntDownTo() throws Exception {
|
public void testIntDownTo() throws Exception {
|
||||||
checkFooBoxIsOk();
|
checkFooBoxIsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testReverse() throws Exception {
|
||||||
|
checkFooBoxIsOk();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
assertEquals(listOf(7, 6, 5, 4, 3), (3..7).reverse())
|
||||||
|
assertEquals(listOf(10, 11, 12, 13), (13 downTo 10).reverse())
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user