Minor: normalize '@Test' annotation casing in all tests.

This commit is contained in:
Ilya Gorbunov
2016-11-16 21:26:39 +03:00
parent 50cd620f92
commit 6a70761783
48 changed files with 749 additions and 751 deletions
@@ -1,35 +1,35 @@
package test.numbers
import kotlin.test.*
import org.junit.Test as test
import org.junit.Test
// TODO: Run these tests during compiler test only (JVM & JS)
class BitwiseOperationsTest {
@test fun orForInt() {
@Test fun orForInt() {
assertEquals(3, 2 or 1)
}
@test fun andForInt() {
@Test fun andForInt() {
assertEquals(0, 1 and 0)
}
@test fun xorForInt() {
@Test fun xorForInt() {
assertEquals(1, 2 xor 3)
}
@test fun shlForInt() {
@Test fun shlForInt() {
assertEquals(4, 1 shl 2)
}
@test fun shrForInt() {
@Test fun shrForInt() {
assertEquals(1, 2 shr 1)
}
@test fun ushrForInt() {
@Test fun ushrForInt() {
assertEquals(2147483647, -1 ushr 1)
}
@test fun invForInt() {
@Test fun invForInt() {
assertEquals(0, (-1).inv())
}
}
@@ -19,17 +19,17 @@ package test.numbers
import kotlin.test.*
import org.junit.Test as test
import org.junit.Test
class CompanionIntrinsicObjectsJVMTest {
@test fun intTest() {
@Test fun intTest() {
val i = Int
assertEquals(java.lang.Integer.MAX_VALUE, Int.MAX_VALUE)
assertEquals(java.lang.Integer.MIN_VALUE, Int.MIN_VALUE)
}
@test fun doubleTest() {
@Test fun doubleTest() {
val d = Double
assertEquals(java.lang.Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)
@@ -40,7 +40,7 @@ class CompanionIntrinsicObjectsJVMTest {
assertEquals(java.lang.Double.MIN_VALUE, Double.MIN_VALUE)
}
@test fun floatTest() {
@Test fun floatTest() {
val f = Float
assertEquals(java.lang.Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY)
@@ -51,34 +51,34 @@ class CompanionIntrinsicObjectsJVMTest {
assertEquals(java.lang.Float.MIN_VALUE, Float.MIN_VALUE)
}
@test fun longTest() {
@Test fun longTest() {
val l = Long
assertEquals(java.lang.Long.MAX_VALUE, Long.MAX_VALUE)
assertEquals(java.lang.Long.MIN_VALUE, Long.MIN_VALUE)
}
@test fun shortTest() {
@Test fun shortTest() {
val s = Short
assertEquals(java.lang.Short.MAX_VALUE, Short.MAX_VALUE)
assertEquals(java.lang.Short.MIN_VALUE, Short.MIN_VALUE)
}
@test fun byteTest() {
@Test fun byteTest() {
val b = Byte
assertEquals(java.lang.Byte.MAX_VALUE, Byte.MAX_VALUE)
assertEquals(java.lang.Byte.MIN_VALUE, Byte.MIN_VALUE)
}
@test fun charTest() {
@Test fun charTest() {
val ch = Char
assertEquals(ch, Char)
}
@test fun stringTest() {
@Test fun stringTest() {
val s = String
assertEquals(s, String)
+3 -3
View File
@@ -5,10 +5,10 @@ import java.math.BigInteger
import java.math.BigDecimal
import kotlin.test.*
import org.junit.Test as test
import org.junit.Test
class MathTest {
@test fun testBigInteger() {
@Test fun testBigInteger() {
val a = BigInteger("2")
val b = BigInteger("3")
@@ -21,7 +21,7 @@ class MathTest {
assertEquals(BigInteger("-2"), (-a).remainder(b))
}
@test fun testBigDecimal() {
@Test fun testBigDecimal() {
val a = BigDecimal("2")
val b = BigDecimal("3")
@@ -2,46 +2,46 @@
package test.numbers
import java.math.BigDecimal
import org.junit.Test as test
import org.junit.Test
import kotlin.test.*
class NumbersJVMTest {
@test fun intMinMaxValues() {
@Test fun intMinMaxValues() {
assertEquals(java.lang.Integer.MIN_VALUE, Int.MIN_VALUE)
assertEquals(java.lang.Integer.MAX_VALUE, Int.MAX_VALUE)
}
@test fun longMinMaxValues() {
@Test fun longMinMaxValues() {
assertEquals(java.lang.Long.MIN_VALUE, Long.MIN_VALUE)
assertEquals(java.lang.Long.MAX_VALUE, Long.MAX_VALUE)
}
@test fun shortMinMaxValues() {
@Test fun shortMinMaxValues() {
assertEquals(java.lang.Short.MIN_VALUE, Short.MIN_VALUE)
assertEquals(java.lang.Short.MAX_VALUE, Short.MAX_VALUE)
}
@test fun byteMinMaxValues() {
@Test fun byteMinMaxValues() {
assertEquals(java.lang.Byte.MIN_VALUE, Byte.MIN_VALUE)
assertEquals(java.lang.Byte.MAX_VALUE, Byte.MAX_VALUE)
}
@test fun doubleMinMaxValues() {
@Test fun doubleMinMaxValues() {
assertEquals(java.lang.Double.MIN_VALUE, Double.MIN_VALUE)
assertEquals(java.lang.Double.MAX_VALUE, Double.MAX_VALUE)
assertEquals(java.lang.Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY)
assertEquals(java.lang.Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY)
}
@test fun floatMinMaxValues() {
@Test fun floatMinMaxValues() {
assertEquals(java.lang.Float.MIN_VALUE, Float.MIN_VALUE)
assertEquals(java.lang.Float.MAX_VALUE, Float.MAX_VALUE)
assertEquals(java.lang.Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY)
assertEquals(java.lang.Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY)
}
@test fun bigDecimalDivRounding() {
@Test fun bigDecimalDivRounding() {
val (d1, d2, d3, d4, d5) = (1..5).map { BigDecimal(it.toString()) }
val d7 = BigDecimal("7")
+9 -9
View File
@@ -1,6 +1,6 @@
package test.numbers
import org.junit.Test as test
import org.junit.Test
import kotlin.test.*
object NumbersTestConstants {
@@ -21,7 +21,7 @@ class NumbersTest {
var one: Int = 1
@test fun intMinMaxValues() {
@Test fun intMinMaxValues() {
assertTrue(Int.MIN_VALUE < 0)
assertTrue(Int.MAX_VALUE > 0)
@@ -34,7 +34,7 @@ class NumbersTest {
// expect(Int.MAX_VALUE) { Int.MIN_VALUE - 1 }
}
@test fun longMinMaxValues() {
@Test fun longMinMaxValues() {
assertTrue(Long.MIN_VALUE < 0)
assertTrue(Long.MAX_VALUE > 0)
@@ -46,7 +46,7 @@ class NumbersTest {
expect(Long.MAX_VALUE) { Long.MIN_VALUE - 1 }
}
@test fun shortMinMaxValues() {
@Test fun shortMinMaxValues() {
assertTrue(Short.MIN_VALUE < 0)
assertTrue(Short.MAX_VALUE > 0)
@@ -58,7 +58,7 @@ class NumbersTest {
expect(Short.MAX_VALUE) { (Short.MIN_VALUE - 1).toShort() }
}
@test fun byteMinMaxValues() {
@Test fun byteMinMaxValues() {
assertTrue(Byte.MIN_VALUE < 0)
assertTrue(Byte.MAX_VALUE > 0)
@@ -70,7 +70,7 @@ class NumbersTest {
expect(Byte.MAX_VALUE) { (Byte.MIN_VALUE - 1).toByte() }
}
@test fun doubleMinMaxValues() {
@Test fun doubleMinMaxValues() {
assertTrue(Double.MIN_VALUE > 0)
assertTrue(Double.MAX_VALUE > 0)
@@ -80,7 +80,7 @@ class NumbersTest {
expect(0.0) { Double.MIN_VALUE / 2 }
}
@test fun floatMinMaxValues() {
@Test fun floatMinMaxValues() {
assertTrue(Float.MIN_VALUE > 0)
assertTrue(Float.MAX_VALUE > 0)
@@ -90,7 +90,7 @@ class NumbersTest {
expect(0.0F) { Float.MIN_VALUE / 2.0F }
}
@test fun doubleProperties() {
@Test fun doubleProperties() {
for (value in listOf(1.0, 0.0, Double.MIN_VALUE, Double.MAX_VALUE))
doTestNumber(value)
for (value in listOf(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY))
@@ -98,7 +98,7 @@ class NumbersTest {
doTestNumber(Double.NaN, isNaN = true)
}
@test fun floatProperties() {
@Test fun floatProperties() {
for (value in listOf(1.0F, 0.0F, Float.MAX_VALUE, Float.MIN_VALUE))
doTestNumber(value)
for (value in listOf(Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY))