Compare commits
No commits in common. "master" and "v0.5" have entirely different histories.
@ -61,7 +61,6 @@ xomrk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
val jvmMain by getting {
|
val jvmMain by getting {
|
||||||
dependsOn(commonMain)
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(kotlinStdlibDependency)
|
compileOnly(kotlinStdlibDependency)
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,4 @@ kotlin.stdlib.default.dependency=false
|
|||||||
kotlin.mpp.applyDefaultHierarchyTemplate=false
|
kotlin.mpp.applyDefaultHierarchyTemplate=false
|
||||||
kotlin.native.enableKlibsCrossCompilation=true
|
kotlin.native.enableKlibsCrossCompilation=true
|
||||||
# compileOnly dependencies from commonMain still throw warning
|
# compileOnly dependencies from commonMain still throw warning
|
||||||
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
|
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
|
||||||
kotlin.js.stdlib.dom.api.included=false
|
|
@ -3,7 +3,6 @@ package ru.landgrafhomyak.utility.highlevel_try_finally
|
|||||||
@PublishedApi
|
@PublishedApi
|
||||||
internal actual object ExceptionsKt {
|
internal actual object ExceptionsKt {
|
||||||
@PublishedApi
|
@PublishedApi
|
||||||
@JvmStatic
|
|
||||||
internal actual fun addSuppressed(e1: Throwable?, e2: Throwable?) {
|
internal actual fun addSuppressed(e1: Throwable?, e2: Throwable?) {
|
||||||
if (e1 == null) throw NullPointerException("e1")
|
if (e1 == null) throw NullPointerException("e1")
|
||||||
if (e2 == null) throw NullPointerException("e2")
|
if (e2 == null) throw NullPointerException("e2")
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ru.landgrafhomyak.utility.highlevel_try_finally.tests
|
package ru.landgrafhomyak.utility.highlevel_try_finally.tests
|
||||||
|
|
||||||
import org.testng.annotations.Test
|
import org.testng.annotations.Test
|
||||||
|
import org.testng.asserts.Assertion
|
||||||
import ru.landgrafhomyak.utility.highlevel_try_finally.safeAutoClose1
|
import ru.landgrafhomyak.utility.highlevel_try_finally.safeAutoClose1
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -8,14 +9,13 @@ class KotlinStdlibDependencyTest {
|
|||||||
@Test
|
@Test
|
||||||
fun testNoKotlinStdlib() {
|
fun testNoKotlinStdlib() {
|
||||||
try {
|
try {
|
||||||
if (KotlinVersion.CURRENT.major != -1)
|
KotlinVersion.CURRENT
|
||||||
throw AssertionError("Kotlin stdlib still in runtime classpath")
|
Assertion().assertTrue(false, "Kotlin stdlib still in runtime classpath")
|
||||||
} catch (_: LinkageError) {
|
} catch (_: LinkageError) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class CustomTestException : RuntimeException()
|
private class CustomTestException : RuntimeException()
|
||||||
private object CustomUnit
|
|
||||||
|
|
||||||
private fun throw7throwFn() {
|
private fun throw7throwFn() {
|
||||||
safeAutoClose1(finally = { throw CustomTestException() }, action = { throw CustomTestException() })
|
safeAutoClose1(finally = { throw CustomTestException() }, action = { throw CustomTestException() })
|
||||||
@ -31,8 +31,8 @@ class KotlinStdlibDependencyTest {
|
|||||||
try {
|
try {
|
||||||
throw7throwFn()
|
throw7throwFn()
|
||||||
} catch (_: CustomTestException) {
|
} catch (_: CustomTestException) {
|
||||||
} catch (le: LinkageError) {
|
} catch (_: LinkageError) {
|
||||||
throw AssertionError("safeAutoClose still has dependency on kotlin stdlib", le)
|
Assertion().assertTrue(false, "safeAutoClose still has dependency on kotlin stdlib")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ class KotlinStdlibDependencyTest {
|
|||||||
try {
|
try {
|
||||||
throw7throwIn()
|
throw7throwIn()
|
||||||
} catch (_: CustomTestException) {
|
} catch (_: CustomTestException) {
|
||||||
} catch (le: LinkageError) {
|
} catch (_: LinkageError) {
|
||||||
throw AssertionError("safeAutoClose still has dependency on kotlin stdlib", le)
|
Assertion().assertTrue(false, "safeAutoClose still has dependency on kotlin stdlib")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user