Move isolated addSuppressed extension test to jvm tests
Conditions for being isolated do not hold anymore: it tested that addSuppressed extension could work without kotlin-stdlib-jdk7, but now the latter is merged to kotlin-stdlib and thus always present #KT-51907
This commit is contained in:
committed by
Space Team
parent
8b68234528
commit
5a4eb22961
@@ -85,7 +85,19 @@ class ExceptionJVMTest {
|
||||
@Test
|
||||
fun addSuppressedSelfDoesNotThrow() {
|
||||
val e1 = Throwable()
|
||||
e1.addSuppressed(e1) // should not throw
|
||||
e1.addSuppressed(e1) // should not throw, extension hides member
|
||||
}
|
||||
|
||||
@Test
|
||||
fun addSuppressedWorksThroughExtension() {
|
||||
val e1 = Throwable()
|
||||
val e2 = Exception("Suppressed")
|
||||
|
||||
assertTrue(e1.suppressedExceptions.isEmpty())
|
||||
e1.addSuppressed(e2)
|
||||
|
||||
assertSame(e2, e1.suppressed.singleOrNull())
|
||||
assertSame(e2, e1.suppressedExceptions.singleOrNull())
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user