Migrate impl to actual in libraries projects

This commit is contained in:
Stanislav Erokhin
2017-09-15 15:55:55 +03:00
parent 481cbd0850
commit 91a99b4726
10 changed files with 17 additions and 17 deletions
@@ -22,14 +22,14 @@ import kotlin.reflect.KClass
* Comments out a block of test code until it is implemented while keeping a link to the code
* to implement in your unit test output
*/
impl fun todo(block: () -> Unit) {
actual fun todo(block: () -> Unit) {
// println("TODO at " + (Exception() as java.lang.Throwable).getStackTrace()?.get(1) + " for " + block)
println("TODO at " + block)
}
/** Asserts that a [block] fails with a specific exception of type [exceptionClass] being thrown. */
impl fun <T : Throwable> assertFailsWith(exceptionClass: KClass<T>, message: String?, block: () -> Unit): T {
actual fun <T : Throwable> assertFailsWith(exceptionClass: KClass<T>, message: String?, block: () -> Unit): T {
val exception = assertFails(message, block)
@Suppress("INVISIBLE_MEMBER")
assertTrue(exceptionClass.isInstance(exception), messagePrefix(message) + "Expected an exception of $exceptionClass to be thrown, but was $exception")
@@ -42,4 +42,4 @@ impl fun <T : Throwable> assertFailsWith(exceptionClass: KClass<T>, message: Str
/**
* Provides the JS implementation of asserter
*/
internal impl fun lookupAsserter(): Asserter = DefaultJsAsserter
internal actual fun lookupAsserter(): Asserter = DefaultJsAsserter
@@ -3,4 +3,4 @@ package org.junit
@Deprecated("Use 'Test' from kotlin.test package",
replaceWith = ReplaceWith("Test", "kotlin.test.Test"),
level = DeprecationLevel.WARNING)
impl typealias Test = kotlin.test.Test
actual typealias Test = kotlin.test.Test