Provide kotlin.AssertionError in kotlin-stdlib-common
Remove related workarounds from kotlin-test-common
This commit is contained in:
@@ -11,7 +11,4 @@ class DefaultAsserter() : Asserter {
|
||||
else
|
||||
throw AssertionError(message)
|
||||
}
|
||||
}
|
||||
|
||||
header fun AssertionError(message: String): Throwable
|
||||
header fun AssertionError(): Throwable
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package kotlin.test
|
||||
|
||||
impl fun AssertionError(message: String): Throwable = kotlin.AssertionError(message)
|
||||
impl fun AssertionError(): Throwable = kotlin.AssertionError()
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin.test
|
||||
|
||||
impl fun AssertionError(message: String): Throwable = java.lang.AssertionError(message)
|
||||
impl fun AssertionError(): Throwable = java.lang.AssertionError()
|
||||
|
||||
@@ -58,6 +58,12 @@ open header class UnsupportedOperationException : RuntimeException {
|
||||
constructor(message: String)
|
||||
}
|
||||
|
||||
// TODO: Provide typealias impl in stdlib-jvm
|
||||
open header class AssertionError : Error {
|
||||
constructor()
|
||||
constructor(message: String)
|
||||
}
|
||||
|
||||
|
||||
header interface Comparator<T> {
|
||||
fun compare(a: T, b: T): Int
|
||||
|
||||
Reference in New Issue
Block a user