Minor: normalize '@Test' annotation casing in all tests.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package test.ranges
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.Test as test
|
||||
import kotlin.test.*
|
||||
|
||||
class CoercionTest {
|
||||
|
||||
@@ -11,14 +11,14 @@ import java.lang.Long.MAX_VALUE as MaxL
|
||||
import java.lang.Long.MIN_VALUE as MinL
|
||||
import java.lang.Character.MAX_VALUE as MaxC
|
||||
import java.lang.Character.MIN_VALUE as MinC
|
||||
import org.junit.Test as test
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
// Test data for codegen is generated from this class. If you change it, rerun GenerateTests
|
||||
public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
|
||||
|
||||
@test fun maxValueToMaxValue() {
|
||||
@Test fun maxValueToMaxValue() {
|
||||
doTest(MaxI..MaxI, MaxI, MaxI, 1, listOf(MaxI))
|
||||
doTest(MaxB..MaxB, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
|
||||
doTest(MaxS..MaxS, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
|
||||
@@ -27,7 +27,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest(MaxC..MaxC, MaxC, MaxC, 1, listOf(MaxC))
|
||||
}
|
||||
|
||||
@test fun maxValueMinusTwoToMaxValue() {
|
||||
@Test fun maxValueMinusTwoToMaxValue() {
|
||||
doTest((MaxI - 2)..MaxI, MaxI - 2, MaxI, 1, listOf(MaxI - 2, MaxI - 1, MaxI))
|
||||
doTest((MaxB - 2).toByte()..MaxB, (MaxB - 2).toInt(), MaxB.toInt(), 1, listOf((MaxB - 2).toInt(), (MaxB - 1).toInt(), MaxB.toInt()))
|
||||
doTest((MaxS - 2).toShort()..MaxS, (MaxS - 2).toInt(), MaxS.toInt(), 1, listOf((MaxS - 2).toInt(), (MaxS - 1).toInt(), MaxS.toInt()))
|
||||
@@ -36,7 +36,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest((MaxC - 2)..MaxC, (MaxC - 2), MaxC, 1, listOf((MaxC - 2), (MaxC - 1), MaxC))
|
||||
}
|
||||
|
||||
@test fun maxValueToMinValue() {
|
||||
@Test fun maxValueToMinValue() {
|
||||
doTest(MaxI..MinI, MaxI, MinI, 1, listOf())
|
||||
doTest(MaxB..MinB, MaxB.toInt(), MinB.toInt(), 1, listOf())
|
||||
doTest(MaxS..MinS, MaxS.toInt(), MinS.toInt(), 1, listOf())
|
||||
@@ -45,7 +45,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest(MaxC..MinC, MaxC, MinC, 1, listOf())
|
||||
}
|
||||
|
||||
@test fun progressionMaxValueToMaxValue() {
|
||||
@Test fun progressionMaxValueToMaxValue() {
|
||||
doTest(MaxI..MaxI step 1, MaxI, MaxI, 1, listOf(MaxI))
|
||||
doTest(MaxB..MaxB step 1, MaxB.toInt(), MaxB.toInt(), 1, listOf(MaxB.toInt()))
|
||||
doTest(MaxS..MaxS step 1, MaxS.toInt(), MaxS.toInt(), 1, listOf(MaxS.toInt()))
|
||||
@@ -54,7 +54,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest(MaxC..MaxC step 1, MaxC, MaxC, 1, listOf(MaxC))
|
||||
}
|
||||
|
||||
@test fun progressionMaxValueMinusTwoToMaxValue() {
|
||||
@Test fun progressionMaxValueMinusTwoToMaxValue() {
|
||||
doTest((MaxI - 2)..MaxI step 2, MaxI - 2, MaxI, 2, listOf(MaxI - 2, MaxI))
|
||||
doTest((MaxB - 2).toByte()..MaxB step 2, (MaxB - 2).toInt(), MaxB.toInt(), 2, listOf((MaxB - 2).toInt(), MaxB.toInt()))
|
||||
doTest((MaxS - 2).toShort()..MaxS step 2, (MaxS - 2).toInt(), MaxS.toInt(), 2, listOf((MaxS - 2).toInt(), MaxS.toInt()))
|
||||
@@ -63,7 +63,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest((MaxC - 2)..MaxC step 2, (MaxC - 2), MaxC, 2, listOf((MaxC - 2), MaxC))
|
||||
}
|
||||
|
||||
@test fun progressionMaxValueToMinValue() {
|
||||
@Test fun progressionMaxValueToMinValue() {
|
||||
doTest(MaxI..MinI step 1, MaxI, MinI, 1, listOf())
|
||||
doTest(MaxB..MinB step 1, MaxB.toInt(), MinB.toInt(), 1, listOf())
|
||||
doTest(MaxS..MinS step 1, MaxS.toInt(), MinS.toInt(), 1, listOf())
|
||||
@@ -72,7 +72,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest(MaxC..MinC step 1, MaxC, MinC, 1, listOf())
|
||||
}
|
||||
|
||||
@test fun progressionMinValueToMinValue() {
|
||||
@Test fun progressionMinValueToMinValue() {
|
||||
doTest(MinI..MinI step 1, MinI, MinI, 1, listOf(MinI))
|
||||
doTest(MinB..MinB step 1, MinB.toInt(), MinB.toInt(), 1, listOf(MinB.toInt()))
|
||||
doTest(MinS..MinS step 1, MinS.toInt(), MinS.toInt(), 1, listOf(MinS.toInt()))
|
||||
@@ -81,7 +81,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest(MinC..MinC step 1, MinC, MinC, 1, listOf(MinC))
|
||||
}
|
||||
|
||||
@test fun inexactToMaxValue() {
|
||||
@Test fun inexactToMaxValue() {
|
||||
doTest((MaxI - 5)..MaxI step 3, MaxI - 5, MaxI - 2, 3, listOf(MaxI - 5, MaxI - 2))
|
||||
doTest((MaxB - 5).toByte()..MaxB step 3, (MaxB - 5).toInt(), (MaxB - 2).toInt(), 3, listOf((MaxB - 5).toInt(), (MaxB - 2).toInt()))
|
||||
doTest((MaxS - 5).toShort()..MaxS step 3, (MaxS - 5).toInt(), (MaxS - 2).toInt(), 3, listOf((MaxS - 5).toInt(), (MaxS - 2).toInt()))
|
||||
@@ -90,7 +90,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest((MaxC - 5)..MaxC step 3, (MaxC - 5), (MaxC - 2), 3, listOf((MaxC - 5), (MaxC - 2)))
|
||||
}
|
||||
|
||||
@test fun progressionDownToMinValue() {
|
||||
@Test fun progressionDownToMinValue() {
|
||||
doTest((MinI + 2) downTo MinI step 1, MinI + 2, MinI, -1, listOf(MinI + 2, MinI + 1, MinI))
|
||||
doTest((MinB + 2).toByte() downTo MinB step 1, (MinB + 2).toInt(), MinB.toInt(), -1, listOf((MinB + 2).toInt(), (MinB + 1).toInt(), MinB.toInt()))
|
||||
doTest((MinS + 2).toShort() downTo MinS step 1, (MinS + 2).toInt(), MinS.toInt(), -1, listOf((MinS + 2).toInt(), (MinS + 1).toInt(), MinS.toInt()))
|
||||
@@ -99,7 +99,7 @@ public class RangeIterationJVMTest : RangeIterationTestBase() {
|
||||
doTest((MinC + 2) downTo MinC step 1, (MinC + 2), MinC, -1, listOf((MinC + 2), (MinC + 1), MinC))
|
||||
}
|
||||
|
||||
@test fun inexactDownToMinValue() {
|
||||
@Test fun inexactDownToMinValue() {
|
||||
doTest((MinI + 5) downTo MinI step 3, MinI + 5, MinI + 2, -3, listOf(MinI + 5, MinI + 2))
|
||||
doTest((MinB + 5).toByte() downTo MinB step 3, (MinB + 5).toInt(), (MinB + 2).toInt(), -3, listOf((MinB + 5).toInt(), (MinB + 2).toInt()))
|
||||
doTest((MinS + 5).toShort() downTo MinS step 3, (MinS + 5).toInt(), (MinS + 2).toInt(), -3, listOf((MinS + 5).toInt(), (MinS + 2).toInt()))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package test.ranges
|
||||
|
||||
import org.junit.Test as test
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
public open class RangeIterationTestBase {
|
||||
@@ -48,14 +48,14 @@ public open class RangeIterationTestBase {
|
||||
// Test data for codegen is generated from this class. If you change it, rerun GenerateTests
|
||||
public class RangeIterationTest : RangeIterationTestBase() {
|
||||
|
||||
@test fun emptyConstant() {
|
||||
@Test fun emptyConstant() {
|
||||
doTest(IntRange.EMPTY, 1, 0, 1, listOf())
|
||||
doTest(LongRange.EMPTY, 1.toLong(), 0.toLong(), 1.toLong(), listOf())
|
||||
|
||||
doTest(CharRange.EMPTY, 1.toChar(), 0.toChar(), 1, listOf())
|
||||
}
|
||||
|
||||
@test fun emptyRange() {
|
||||
@Test fun emptyRange() {
|
||||
doTest(10..5, 10, 5, 1, listOf())
|
||||
doTest(10.toByte()..(-5).toByte(), 10, (-5), 1, listOf())
|
||||
doTest(10.toShort()..(-5).toShort(), 10, (-5), 1, listOf())
|
||||
@@ -64,7 +64,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest('z'..'a', 'z', 'a', 1, listOf())
|
||||
}
|
||||
|
||||
@test fun oneElementRange() {
|
||||
@Test fun oneElementRange() {
|
||||
doTest(5..5, 5, 5, 1, listOf(5))
|
||||
doTest(5.toByte()..5.toByte(), 5, 5, 1, listOf(5))
|
||||
doTest(5.toShort()..5.toShort(), 5, 5, 1, listOf(5))
|
||||
@@ -73,7 +73,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest('k'..'k', 'k', 'k', 1, listOf('k'))
|
||||
}
|
||||
|
||||
@test fun simpleRange() {
|
||||
@Test fun simpleRange() {
|
||||
doTest(3..9, 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
doTest(3.toByte()..9.toByte(), 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
doTest(3.toShort()..9.toShort(), 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
@@ -83,7 +83,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
}
|
||||
|
||||
|
||||
@test fun simpleRangeWithNonConstantEnds() {
|
||||
@Test fun simpleRangeWithNonConstantEnds() {
|
||||
doTest((1 + 2)..(10 - 1), 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
doTest((1.toByte() + 2.toByte()).toByte()..(10.toByte() - 1.toByte()).toByte(), 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
doTest((1.toShort() + 2.toShort()).toShort()..(10.toShort() - 1.toShort()).toShort(), 3, 9, 1, listOf(3, 4, 5, 6, 7, 8, 9))
|
||||
@@ -92,7 +92,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest(("ace"[1])..("age"[1]), 'c', 'g', 1, listOf('c', 'd', 'e', 'f', 'g'))
|
||||
}
|
||||
|
||||
@test fun openRange() {
|
||||
@Test fun openRange() {
|
||||
doTest(1 until 5, 1, 4, 1, listOf(1, 2, 3, 4))
|
||||
doTest(1.toByte() until 5.toByte(), 1, 4, 1, listOf(1, 2, 3, 4))
|
||||
doTest(1.toShort() until 5.toShort(), 1, 4, 1, listOf(1, 2, 3, 4))
|
||||
@@ -101,7 +101,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
}
|
||||
|
||||
|
||||
@test fun emptyDownto() {
|
||||
@Test fun emptyDownto() {
|
||||
doTest(5 downTo 10, 5, 10, -1, listOf())
|
||||
doTest(5.toByte() downTo 10.toByte(), 5, 10, -1, listOf())
|
||||
doTest(5.toShort() downTo 10.toShort(), 5, 10, -1, listOf())
|
||||
@@ -110,7 +110,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest('a' downTo 'z', 'a', 'z', -1, listOf())
|
||||
}
|
||||
|
||||
@test fun oneElementDownTo() {
|
||||
@Test fun oneElementDownTo() {
|
||||
doTest(5 downTo 5, 5, 5, -1, listOf(5))
|
||||
doTest(5.toByte() downTo 5.toByte(), 5, 5, -1, listOf(5))
|
||||
doTest(5.toShort() downTo 5.toShort(), 5, 5, -1, listOf(5))
|
||||
@@ -119,7 +119,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest('k' downTo 'k', 'k', 'k', -1, listOf('k'))
|
||||
}
|
||||
|
||||
@test fun simpleDownTo() {
|
||||
@Test fun simpleDownTo() {
|
||||
doTest(9 downTo 3, 9, 3, -1, listOf(9, 8, 7, 6, 5, 4, 3))
|
||||
doTest(9.toByte() downTo 3.toByte(), 9, 3, -1, listOf(9, 8, 7, 6, 5, 4, 3))
|
||||
doTest(9.toShort() downTo 3.toShort(), 9, 3, -1, listOf(9, 8, 7, 6, 5, 4, 3))
|
||||
@@ -129,7 +129,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
}
|
||||
|
||||
|
||||
@test fun simpleSteppedRange() {
|
||||
@Test fun simpleSteppedRange() {
|
||||
doTest(3..9 step 2, 3, 9, 2, listOf(3, 5, 7, 9))
|
||||
doTest(3.toByte()..9.toByte() step 2, 3, 9, 2, listOf(3, 5, 7, 9))
|
||||
doTest(3.toShort()..9.toShort() step 2, 3, 9, 2, listOf(3, 5, 7, 9))
|
||||
@@ -138,7 +138,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest('c'..'g' step 2, 'c', 'g', 2, listOf('c', 'e', 'g'))
|
||||
}
|
||||
|
||||
@test fun simpleSteppedDownTo() {
|
||||
@Test fun simpleSteppedDownTo() {
|
||||
doTest(9 downTo 3 step 2, 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
doTest(9.toByte() downTo 3.toByte() step 2, 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
doTest(9.toShort() downTo 3.toShort() step 2, 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
@@ -149,7 +149,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
|
||||
|
||||
// 'inexact' means last element is not equal to sequence end
|
||||
@test fun inexactSteppedRange() {
|
||||
@Test fun inexactSteppedRange() {
|
||||
doTest(3..8 step 2, 3, 7, 2, listOf(3, 5, 7))
|
||||
doTest(3.toByte()..8.toByte() step 2, 3, 7, 2, listOf(3, 5, 7))
|
||||
doTest(3.toShort()..8.toShort() step 2, 3, 7, 2, listOf(3, 5, 7))
|
||||
@@ -159,7 +159,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
}
|
||||
|
||||
// 'inexact' means last element is not equal to sequence end
|
||||
@test fun inexactSteppedDownTo() {
|
||||
@Test fun inexactSteppedDownTo() {
|
||||
doTest(8 downTo 3 step 2, 8, 4, -2, listOf(8, 6, 4))
|
||||
doTest(8.toByte() downTo 3.toByte() step 2, 8, 4, -2, listOf(8, 6, 4))
|
||||
doTest(8.toShort() downTo 3.toShort() step 2, 8, 4, -2, listOf(8, 6, 4))
|
||||
@@ -169,7 +169,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
}
|
||||
|
||||
|
||||
@test fun reversedEmptyRange() {
|
||||
@Test fun reversedEmptyRange() {
|
||||
doTest((5..3).reversed(), 3, 5, -1, listOf())
|
||||
doTest((5.toByte()..3.toByte()).reversed(), 3, 5, -1, listOf())
|
||||
doTest((5.toShort()..3.toShort()).reversed(), 3, 5, -1, listOf())
|
||||
@@ -178,7 +178,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest(('c'..'a').reversed(), 'a', 'c', -1, listOf())
|
||||
}
|
||||
|
||||
@test fun reversedEmptyBackSequence() {
|
||||
@Test fun reversedEmptyBackSequence() {
|
||||
doTest((3 downTo 5).reversed(), 5, 3, 1, listOf())
|
||||
doTest((3.toByte() downTo 5.toByte()).reversed(), 5, 3, 1, listOf())
|
||||
doTest((3.toShort() downTo 5.toShort()).reversed(), 5, 3, 1, listOf())
|
||||
@@ -187,7 +187,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest(('a' downTo 'c').reversed(), 'c', 'a', 1, listOf())
|
||||
}
|
||||
|
||||
@test fun reversedRange() {
|
||||
@Test fun reversedRange() {
|
||||
doTest((3..5).reversed(), 5, 3, -1, listOf(5, 4, 3))
|
||||
doTest((3.toByte()..5.toByte()).reversed(),5, 3, -1, listOf(5, 4, 3))
|
||||
doTest((3.toShort()..5.toShort()).reversed(), 5, 3, -1, listOf(5, 4, 3))
|
||||
@@ -196,7 +196,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
doTest(('a'..'c').reversed(), 'c', 'a', -1, listOf('c', 'b', 'a'))
|
||||
}
|
||||
|
||||
@test fun reversedBackSequence() {
|
||||
@Test fun reversedBackSequence() {
|
||||
doTest((5 downTo 3).reversed(), 3, 5, 1, listOf(3, 4, 5))
|
||||
doTest((5.toByte() downTo 3.toByte()).reversed(), 3, 5, 1, listOf(3, 4, 5))
|
||||
doTest((5.toShort() downTo 3.toShort()).reversed(), 3, 5, 1, listOf(3, 4, 5))
|
||||
@@ -206,7 +206,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
|
||||
}
|
||||
|
||||
@test fun reversedSimpleSteppedRange() {
|
||||
@Test fun reversedSimpleSteppedRange() {
|
||||
doTest((3..9 step 2).reversed(), 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
doTest((3.toByte()..9.toByte() step 2).reversed(), 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
doTest((3.toShort()..9.toShort() step 2).reversed(), 9, 3, -2, listOf(9, 7, 5, 3))
|
||||
@@ -217,7 +217,7 @@ public class RangeIterationTest : RangeIterationTestBase() {
|
||||
|
||||
// invariant progression.reversed().toList() == progression.toList().reversed() is preserved
|
||||
// 'inexact' means that start of reversed progression is not the end of original progression, but the last element
|
||||
@test fun reversedInexactSteppedDownTo() {
|
||||
@Test fun reversedInexactSteppedDownTo() {
|
||||
doTest((8 downTo 3 step 2).reversed(), 4, 8, 2, listOf(4, 6, 8))
|
||||
doTest((8.toByte() downTo 3.toByte() step 2).reversed(), 4, 8, 2, listOf(4, 6, 8))
|
||||
doTest((8.toShort() downTo 3.toShort() step 2).reversed(), 4, 8, 2, listOf(4, 6, 8))
|
||||
|
||||
@@ -3,19 +3,19 @@ package test.ranges
|
||||
|
||||
import java.lang.Double as jDouble
|
||||
import java.lang.Float as jFloat
|
||||
import org.junit.Test as test
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
public class RangeJVMTest {
|
||||
|
||||
@test fun doubleRange() {
|
||||
@Test fun doubleRange() {
|
||||
val range = -1.0..3.14159265358979
|
||||
assertFalse(jDouble.NEGATIVE_INFINITY in range)
|
||||
assertFalse(jDouble.POSITIVE_INFINITY in range)
|
||||
assertFalse(jDouble.NaN in range)
|
||||
}
|
||||
|
||||
@test fun floatRange() {
|
||||
@Test fun floatRange() {
|
||||
val range = -1.0f..3.14159f
|
||||
assertFalse(jFloat.NEGATIVE_INFINITY in range)
|
||||
assertFalse(jFloat.POSITIVE_INFINITY in range)
|
||||
@@ -23,7 +23,7 @@ public class RangeJVMTest {
|
||||
assertFalse(jFloat.NaN in range)
|
||||
}
|
||||
|
||||
@test fun illegalProgressionCreation() {
|
||||
@Test fun illegalProgressionCreation() {
|
||||
fun assertFailsWithIllegalArgument(f: () -> Unit) = assertFailsWith(IllegalArgumentException::class, block = f)
|
||||
// create Progression explicitly with increment = 0
|
||||
assertFailsWithIllegalArgument { IntProgression.fromClosedRange(0, 5, 0) }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package test.ranges
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test as test
|
||||
import org.junit.Test
|
||||
|
||||
public class RangeTest {
|
||||
@test fun intRange() {
|
||||
@Test fun intRange() {
|
||||
val range = -5..9
|
||||
assertFalse(-1000 in range)
|
||||
assertFalse(-6 in range)
|
||||
@@ -39,7 +39,7 @@ public class RangeTest {
|
||||
assertTrue((1 until Int.MIN_VALUE).isEmpty())
|
||||
}
|
||||
|
||||
@test fun byteRange() {
|
||||
@Test fun byteRange() {
|
||||
val range = (-5).toByte()..9.toByte()
|
||||
assertFalse((-100).toByte() in range)
|
||||
assertFalse((-6).toByte() in range)
|
||||
@@ -74,7 +74,7 @@ public class RangeTest {
|
||||
assertTrue((0.toByte() until Int.MIN_VALUE).isEmpty())
|
||||
}
|
||||
|
||||
@test fun shortRange() {
|
||||
@Test fun shortRange() {
|
||||
val range = (-5).toShort()..9.toShort()
|
||||
assertFalse((-1000).toShort() in range)
|
||||
assertFalse((-6).toShort() in range)
|
||||
@@ -108,7 +108,7 @@ public class RangeTest {
|
||||
assertTrue((0.toShort() until Int.MIN_VALUE).isEmpty())
|
||||
}
|
||||
|
||||
@test fun longRange() {
|
||||
@Test fun longRange() {
|
||||
val range = -5L..9L
|
||||
assertFalse(-10000000L in range)
|
||||
assertFalse(-6L in range)
|
||||
@@ -145,7 +145,7 @@ public class RangeTest {
|
||||
|
||||
}
|
||||
|
||||
@test fun charRange() {
|
||||
@Test fun charRange() {
|
||||
val range = 'c'..'w'
|
||||
assertFalse('0' in range)
|
||||
assertFalse('b' in range)
|
||||
@@ -172,7 +172,7 @@ public class RangeTest {
|
||||
assertTrue(('A' until '\u0000').isEmpty())
|
||||
}
|
||||
|
||||
@test fun doubleRange() {
|
||||
@Test fun doubleRange() {
|
||||
val range = -1.0..3.14159265358979
|
||||
assertFalse(-1e200 in range)
|
||||
assertFalse(-100.0 in range)
|
||||
@@ -198,7 +198,7 @@ public class RangeTest {
|
||||
assertTrue(1.toFloat() in range)
|
||||
}
|
||||
|
||||
@test fun floatRange() {
|
||||
@Test fun floatRange() {
|
||||
val range = -1.0f..3.14159f
|
||||
assertFalse(-1e30f in range)
|
||||
assertFalse(-100.0f in range)
|
||||
@@ -226,7 +226,7 @@ public class RangeTest {
|
||||
assertFalse(Double.MAX_VALUE in range)
|
||||
}
|
||||
|
||||
@test fun isEmpty() {
|
||||
@Test fun isEmpty() {
|
||||
assertTrue((2..1).isEmpty())
|
||||
assertTrue((2L..0L).isEmpty())
|
||||
assertTrue((1.toShort()..-1.toShort()).isEmpty())
|
||||
@@ -245,7 +245,7 @@ public class RangeTest {
|
||||
assertTrue(("range".."progression").isEmpty())
|
||||
}
|
||||
|
||||
@test fun emptyEquals() {
|
||||
@Test fun emptyEquals() {
|
||||
assertTrue(IntRange.EMPTY == IntRange.EMPTY)
|
||||
assertEquals(IntRange.EMPTY, IntRange.EMPTY)
|
||||
assertEquals(0L..42L, 0L..42L)
|
||||
@@ -270,7 +270,7 @@ public class RangeTest {
|
||||
assertFalse(("aa".."bb") == ("aaa".."bbb"))
|
||||
}
|
||||
|
||||
@test fun emptyHashCode() {
|
||||
@Test fun emptyHashCode() {
|
||||
assertEquals((0..42).hashCode(), (0..42).hashCode())
|
||||
assertEquals((1.23..4.56).hashCode(), (1.23..4.56).hashCode())
|
||||
|
||||
@@ -289,7 +289,7 @@ public class RangeTest {
|
||||
assertEquals(("range".."progression").hashCode(), ("hashcode".."equals").hashCode())
|
||||
}
|
||||
|
||||
@test fun comparableRange() {
|
||||
@Test fun comparableRange() {
|
||||
val range = "island".."isle"
|
||||
assertFalse("apple" in range)
|
||||
assertFalse("icicle" in range)
|
||||
|
||||
Reference in New Issue
Block a user