Make Closeable.use call addSuppressed
Call addSuppressed when it's provided by the supplementary artifact for jdk7, and only when targeting apiVersion > 1.1 #KT-18961 Fixed
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package kotlin.jdk7.test
|
||||
package test.jdk7
|
||||
|
||||
import org.junit.Ignore
|
||||
import java.io.*
|
||||
@@ -60,7 +60,6 @@ class TryWithResourcesCloseableTest {
|
||||
assertTrue(e.suppressed.isEmpty())
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test fun opFailsCloseFails() {
|
||||
val e = assertFails {
|
||||
Resource(faultyClose = true).use { error("op fail") }
|
||||
@@ -69,7 +68,6 @@ class TryWithResourcesCloseableTest {
|
||||
assertTrue(e.suppressed.single() is IOException)
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test fun opFailsCloseFailsTwice() {
|
||||
val e = assertFails {
|
||||
Resource(faultyClose = true).use { _ ->
|
||||
|
||||
Reference in New Issue
Block a user