Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
(and in jvm-only and js-only tests also)
This commit is contained in:
@@ -4,7 +4,6 @@ package test.exceptions
|
||||
import kotlin.test.*
|
||||
import test.collections.assertArrayNotSameButEquals
|
||||
|
||||
import org.junit.Test
|
||||
import java.io.PrintWriter
|
||||
import java.io.*
|
||||
import java.nio.charset.Charset
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.comparisons
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import kotlin.comparisons.*
|
||||
|
||||
data class Item(val name: String, val rating: Int) : Comparable<Item> {
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package test.tuples
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNotEquals
|
||||
import kotlin.test.*
|
||||
|
||||
class PairTest {
|
||||
val p = Pair(1, "a")
|
||||
|
||||
@@ -19,7 +19,6 @@ package test.collections
|
||||
import test.collections.behaviors.*
|
||||
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import kotlin.comparisons.*
|
||||
|
||||
fun <T> assertArrayNotSameButEquals(expected: Array<out T>, actual: Array<out T>, message: String = "") { assertTrue(expected !== actual && expected contentEquals actual, message) }
|
||||
|
||||
@@ -9,7 +9,6 @@ import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
import java.util.*
|
||||
|
||||
import org.junit.Test
|
||||
import test.io.deserializeFromHex
|
||||
import test.io.serializeAndDeserialize
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import test.collections.behaviors.*
|
||||
import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
|
||||
import kotlin.comparisons.*
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class GroupingTest {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test
|
||||
import test.*
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import java.util.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class IteratorsTest {
|
||||
@Test fun iterationOverIterator() {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections.binarySearch
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
|
||||
class ListBinarySearchTest {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class ListSpecificTest {
|
||||
val data = listOf("foo", "bar")
|
||||
|
||||
@@ -3,10 +3,7 @@ package test.collections
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.ConcurrentMap
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFails
|
||||
import kotlin.test.expect
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
|
||||
class MapJVMTest {
|
||||
|
||||
@@ -2,7 +2,6 @@ package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
import test.*
|
||||
import org.junit.Test
|
||||
|
||||
class MapTest {
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class MutableCollectionTest {
|
||||
fun <T, C: MutableCollection<T>> testOperation(before: List<T>, after: List<T>, expectedModified: Boolean, toMutableCollection: (List<T>) -> C)
|
||||
|
||||
@@ -18,10 +18,7 @@ package test.collections
|
||||
|
||||
import test.collections.behaviors.listBehavior
|
||||
import test.collections.compare
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class ReversedViewsTest {
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.*
|
||||
|
||||
class SequenceJVMTest {
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class SetOperationsTest {
|
||||
@Test fun distinct() {
|
||||
|
||||
@@ -4,7 +4,6 @@ package test.concurrent
|
||||
import kotlin.concurrent.*
|
||||
import kotlin.test.*
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import java.util.concurrent.*
|
||||
import java.util.concurrent.TimeUnit.*
|
||||
|
||||
@@ -7,7 +7,6 @@ import kotlin.test.*
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.Timer
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class TimerTest {
|
||||
@Test fun scheduledTask() {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package test.coroutines
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
class CoroutineContextTest {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package test.coroutines
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package test.coroutines
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import kotlin.coroutines.experimental.buildSequence
|
||||
import kotlin.coroutines.experimental.buildIterator
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
|
||||
@@ -3,7 +3,6 @@ package test.io
|
||||
|
||||
import java.io.*
|
||||
import java.util.*
|
||||
import org.junit.Test
|
||||
import kotlin.io.walkTopDown
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import java.io.Writer
|
||||
import java.io.BufferedReader
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import java.io.File
|
||||
import kotlin.test.assertEquals
|
||||
import java.io.Reader
|
||||
import java.io.StringReader
|
||||
import java.net.URL
|
||||
import java.util.ArrayList
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
fun sample(): Reader = StringReader("Hello\nWorld");
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package test.io
|
||||
|
||||
import java.io.*
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
private class Serial(val name: String) : Serializable {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package test.collections.js
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class JsArrayTest {
|
||||
|
||||
@@ -2,7 +2,6 @@ package test.collections.js
|
||||
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
import org.junit.Test
|
||||
|
||||
class JsCollectionsTest {
|
||||
val TEST_LIST = arrayOf(2, 0, 9, 7, 1).toList()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections.js
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import test.collections.*
|
||||
import test.collections.behaviors.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.collections.js
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import test.collections.*
|
||||
import test.collections.behaviors.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion // TODO: Can't run in JS: spaces in function name KT-4160
|
||||
package test.language
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class EscapedTestNamesTest {
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.math.BigInteger
|
||||
import java.math.BigDecimal
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import java.math.MathContext
|
||||
import java.math.RoundingMode
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.numbers
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
// TODO: Run these tests during compiler test only (JVM & JS)
|
||||
class BitwiseOperationsTest {
|
||||
|
||||
@@ -19,7 +19,6 @@ package test.numbers
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class CompanionIntrinsicObjectsJVMTest {
|
||||
@Test fun intTest() {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package test.numbers
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import kotlin.math.*
|
||||
|
||||
class MathJVMTest {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package test.numbers
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.math.*
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package numbers
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.test.*
|
||||
import kotlin.comparisons.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
val Double.Companion.values get() = listOf(0.0, NEGATIVE_INFINITY, MIN_VALUE, MAX_VALUE, POSITIVE_INFINITY, NaN)
|
||||
val Float.Companion.values get() = listOf(0.0f, NEGATIVE_INFINITY, MIN_VALUE, MAX_VALUE, POSITIVE_INFINITY, NaN)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package test.numbers
|
||||
|
||||
import java.math.BigDecimal
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class NumbersJVMTest {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.numbers
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
object NumbersTestConstants {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.properties.delegation
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
import kotlin.properties.*
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.properties.delegation.map
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class ValByMapExtensionsTest {
|
||||
val map: Map<String, String> = hashMapOf("a" to "all", "b" to "bar", "c" to "code")
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.properties.delegation.lazy
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.properties.*
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.ranges
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class CoercionTest {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package test.ranges
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.comparisons.*
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
class ProgressionLastElementTest {
|
||||
|
||||
@@ -11,7 +11,6 @@ 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
|
||||
import kotlin.test.*
|
||||
|
||||
// Test data for codegen is generated from this class. If you change it, rerun GenerateTests
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.ranges
|
||||
|
||||
import org.junit.Test
|
||||
import test.collections.behaviors.iteratorBehavior
|
||||
import test.collections.compare
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.ranges
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
public class RangeTest {
|
||||
@Test fun intRange() {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
package test.reflection
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class MyAnno
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class CharJVMTest {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
import test.collections.compare
|
||||
import test.io.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
@@ -3,7 +3,6 @@ package test.text
|
||||
import kotlin.text.*
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class RegexTest {
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class StringBuilderJVMTest() {
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class StringBuilderTest {
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import test.collections.assertArrayNotSameButEquals
|
||||
import java.util.*
|
||||
import kotlin.test.*
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
class StringJVMTest {
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class StringNumberConversionTest {
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
import test.*
|
||||
import org.junit.Test
|
||||
import test.collections.behaviors.iteratorBehavior
|
||||
import test.collections.compare
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.utils
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import java.io.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import kotlin.concurrent.thread
|
||||
import org.junit.Test
|
||||
import test.io.serializeAndDeserialize
|
||||
|
||||
class LazyJVMTest {
|
||||
|
||||
@@ -2,7 +2,6 @@ package test.utils
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class LazyTest {
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package test.utils
|
||||
|
||||
import org.junit.Test
|
||||
import kotlin.test.*
|
||||
|
||||
class PreconditionsTest() {
|
||||
|
||||
@@ -18,7 +18,6 @@ package test.utils
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.test.*
|
||||
import org.junit.Test
|
||||
|
||||
class TODOTest {
|
||||
private class PartiallyImplementedClass {
|
||||
|
||||
Reference in New Issue
Block a user