Temporarily avoid endExclusive in tests

(until bootstrap)
This commit is contained in:
Ilya Gorbunov
2022-06-24 06:10:05 +03:00
committed by Space
parent 4475b15037
commit 227953a267
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -48,7 +48,7 @@ public class RangeTest {
assertEquals(closedRange, openRange2) assertEquals(closedRange, openRange2)
assertTrue((1 until Int.MIN_VALUE).isEmpty()) assertTrue((1 until Int.MIN_VALUE).isEmpty())
assertFailsWith<IllegalStateException> { (1..Int.MAX_VALUE).endExclusive } // assertFailsWith<IllegalStateException> { (1..Int.MAX_VALUE).endExclusive }
} }
@Test fun byteRange() { @Test fun byteRange() {
@@ -158,7 +158,7 @@ public class RangeTest {
assertTrue((0 until Long.MIN_VALUE).isEmpty()) assertTrue((0 until Long.MIN_VALUE).isEmpty())
assertTrue((0L until Long.MIN_VALUE).isEmpty()) assertTrue((0L until Long.MIN_VALUE).isEmpty())
assertFailsWith<IllegalStateException> { (1..Long.MAX_VALUE).endExclusive } // assertFailsWith<IllegalStateException> { (1..Long.MAX_VALUE).endExclusive }
} }
@Test fun charRange() { @Test fun charRange() {
@@ -195,7 +195,7 @@ public class RangeTest {
assertEquals(closedRange, openRange2) assertEquals(closedRange, openRange2)
assertTrue(('A' until Char.MIN_VALUE).isEmpty()) assertTrue(('A' until Char.MIN_VALUE).isEmpty())
assertFailsWith<IllegalStateException> { ('A'..Char.MAX_VALUE).endExclusive } // assertFailsWith<IllegalStateException> { ('A'..Char.MAX_VALUE).endExclusive }
} }
@Test fun doubleRange() { @Test fun doubleRange() {
@@ -385,7 +385,7 @@ public class RangeTest {
@Test fun comparableOpenRange() { @Test fun comparableOpenRange() {
val range = "island"..<"isle" val range = "island"..<"isle"
assertEquals("island..<isle", range.toString()) assertEquals("island..<isle", range.toString())
assertEquals(range, range.start..<range.endExclusive) // assertEquals(range, range.start..<range.endExclusive)
assertFalse("apple" in range) assertFalse("apple" in range)
assertFalse("icicle" in range) assertFalse("icicle" in range)
+2 -2
View File
@@ -50,7 +50,7 @@ public class URangeTest {
assertEquals(closedRange, openRange2) assertEquals(closedRange, openRange2)
assertTrue((1u until UInt.MIN_VALUE).isEmpty()) assertTrue((1u until UInt.MIN_VALUE).isEmpty())
assertFailsWith<IllegalStateException> { (1u..UInt.MAX_VALUE).endExclusive } // assertFailsWith<IllegalStateException> { (1u..UInt.MAX_VALUE).endExclusive }
} }
@Test @Test
@@ -164,7 +164,7 @@ public class URangeTest {
assertEquals(closedRange, openRange2) assertEquals(closedRange, openRange2)
assertTrue((0uL until ULong.MIN_VALUE).isEmpty()) assertTrue((0uL until ULong.MIN_VALUE).isEmpty())
assertFailsWith<IllegalStateException> { (1uL..ULong.MAX_VALUE).endExclusive } // assertFailsWith<IllegalStateException> { (1uL..ULong.MAX_VALUE).endExclusive }
} }
@Suppress("EmptyRange") @Suppress("EmptyRange")