diff --git a/libraries/stdlib/js/test/collections/ArraysJsTest.kt b/libraries/stdlib/js/test/collections/ArraysJsTest.kt index c5aa9eaef64..2ade5ddf37e 100644 --- a/libraries/stdlib/js/test/collections/ArraysJsTest.kt +++ b/libraries/stdlib/js/test/collections/ArraysJsTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package test.js.collections +package test.collections.js import kotlin.test.* diff --git a/libraries/stdlib/js/test/core/PromiseTest.kt b/libraries/stdlib/js/test/core/PromiseTest.kt index 54bc73ec208..4cc148240fd 100644 --- a/libraries/stdlib/js/test/core/PromiseTest.kt +++ b/libraries/stdlib/js/test/core/PromiseTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package core +package test.js import test.assertStaticAndRuntimeTypeIs import test.assertStaticTypeIs diff --git a/libraries/stdlib/jvm/test/ExceptionJVMTest.kt b/libraries/stdlib/jvm/test/exceptions/ExceptionJVMTest.kt similarity index 88% rename from libraries/stdlib/jvm/test/ExceptionJVMTest.kt rename to libraries/stdlib/jvm/test/exceptions/ExceptionJVMTest.kt index 84e134a49f4..ec515323019 100644 --- a/libraries/stdlib/jvm/test/ExceptionJVMTest.kt +++ b/libraries/stdlib/jvm/test/exceptions/ExceptionJVMTest.kt @@ -1,27 +1,27 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ package test.exceptions -import kotlin.test.* import test.collections.assertArrayNotSameButEquals import test.testOnJvm7AndAbove - -import java.io.PrintWriter import java.io.* import java.nio.charset.Charset +import kotlin.test.* class ExceptionJVMTest { - @Test fun printStackTraceOnRuntimeException() { + @Test + fun printStackTraceOnRuntimeException() { assertPrintStackTrace(RuntimeException("Crikey!")) assertPrintStackTraceStream(RuntimeException("Crikey2")) assertToStringWithTrace(RuntimeException("ToString")) } - @Test fun printStackTraceOnError() { + @Test + fun printStackTraceOnError() { assertPrintStackTrace(Error("Oh dear")) assertPrintStackTraceStream(Error("Oh dear2")) assertToStringWithTrace(Error("ToString")) @@ -66,7 +66,8 @@ class ExceptionJVMTest { } } - @Test fun changeStackTrace() { + @Test + fun changeStackTrace() { val exception = RuntimeException("Fail") var stackTrace = exception.stackTrace stackTrace = stackTrace.dropLast(1).toTypedArray() @@ -74,19 +75,22 @@ class ExceptionJVMTest { assertArrayNotSameButEquals(stackTrace, exception.stackTrace) } - @Test fun addSuppressedDoesNotThrow() { + @Test + fun addSuppressedDoesNotThrow() { val e1 = Throwable() val e2 = Exception("Suppressed") e1.addSuppressed(e2) } - @Test fun addSuppressedSelfDoesNotThrow() { + @Test + fun addSuppressedSelfDoesNotThrow() { val e1 = Throwable() e1.addSuppressed(e1) // should not throw } - @Test fun circularCauseStackTrace() { + @Test + fun circularCauseStackTrace() { val e1 = Exception("cause") val e2 = Error("induced", e1) e1.initCause(e2) diff --git a/libraries/stdlib/jvm/test/random/RandomSerializationTest.kt b/libraries/stdlib/jvm/test/random/RandomSerializationTest.kt index c5193e7c58d..dd513e5b00d 100644 --- a/libraries/stdlib/jvm/test/random/RandomSerializationTest.kt +++ b/libraries/stdlib/jvm/test/random/RandomSerializationTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package random +package test.random import test.io.* import kotlin.random.* diff --git a/libraries/stdlib/test/OrderingTest.kt b/libraries/stdlib/test/comparisons/OrderingTest.kt similarity index 99% rename from libraries/stdlib/test/OrderingTest.kt rename to libraries/stdlib/test/comparisons/OrderingTest.kt index 48fa0a3af79..e03bc6617d4 100644 --- a/libraries/stdlib/test/OrderingTest.kt +++ b/libraries/stdlib/test/comparisons/OrderingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ diff --git a/libraries/stdlib/test/coroutines/cancellation/CancellationExceptionTest.kt b/libraries/stdlib/test/coroutines/cancellation/CancellationExceptionTest.kt index 5efbce2f359..7cfdb1714c3 100644 --- a/libraries/stdlib/test/coroutines/cancellation/CancellationExceptionTest.kt +++ b/libraries/stdlib/test/coroutines/cancellation/CancellationExceptionTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package coroutines.cancellation +package test.coroutines.cancellation import kotlin.coroutines.cancellation.CancellationException import kotlin.test.Test diff --git a/libraries/stdlib/test/ExceptionTest.kt b/libraries/stdlib/test/exceptions/ExceptionTest.kt similarity index 98% rename from libraries/stdlib/test/ExceptionTest.kt rename to libraries/stdlib/test/exceptions/ExceptionTest.kt index 612bf2e70e5..0c44ea831ba 100644 --- a/libraries/stdlib/test/ExceptionTest.kt +++ b/libraries/stdlib/test/exceptions/ExceptionTest.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -8,6 +8,7 @@ package test.exceptions import test.supportsSuppressedExceptions import kotlin.test.* +@Suppress("Reformat") // author's formatting class ExceptionTest { private val cause = Exception("cause") diff --git a/libraries/stdlib/test/numbers/NaNPropagationTest.kt b/libraries/stdlib/test/numbers/NaNPropagationTest.kt index bdc8e71170d..a4483056f57 100644 --- a/libraries/stdlib/test/numbers/NaNPropagationTest.kt +++ b/libraries/stdlib/test/numbers/NaNPropagationTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package numbers +package test.numbers import kotlin.test.* diff --git a/libraries/stdlib/test/ranges/URangeTest.kt b/libraries/stdlib/test/ranges/URangeTest.kt index 68bbdf3c79d..7ed7ce8fb31 100644 --- a/libraries/stdlib/test/ranges/URangeTest.kt +++ b/libraries/stdlib/test/ranges/URangeTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package ranges +package test.ranges import kotlin.test.* diff --git a/libraries/stdlib/test/unsigned/UComparisonsTest.kt b/libraries/stdlib/test/unsigned/UComparisonsTest.kt index a8fc24b0578..f1b9413c4e1 100644 --- a/libraries/stdlib/test/unsigned/UComparisonsTest.kt +++ b/libraries/stdlib/test/unsigned/UComparisonsTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package unsigned +package test.unsigned import kotlin.test.Test import kotlin.test.expect diff --git a/libraries/stdlib/test/TuplesTest.kt b/libraries/stdlib/test/utils/TuplesTest.kt similarity index 97% rename from libraries/stdlib/test/TuplesTest.kt rename to libraries/stdlib/test/utils/TuplesTest.kt index c1e6704a499..189a8c5863c 100644 --- a/libraries/stdlib/test/TuplesTest.kt +++ b/libraries/stdlib/test/utils/TuplesTest.kt @@ -1,9 +1,9 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ -package test.tuples +package test.utils import kotlin.test.*