Unify test package names in kotlin-stdlib tests
This makes 'test.' an implicit package prefix, thus fixing the inspection "Package directive doesn't match file location" positive in almost all test files.
This commit is contained in:
@@ -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.*
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+14
-10
@@ -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)
|
||||
@@ -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.*
|
||||
|
||||
+1
-1
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-1
@@ -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")
|
||||
|
||||
@@ -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.*
|
||||
|
||||
|
||||
@@ -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.*
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.*
|
||||
|
||||
Reference in New Issue
Block a user