1 /* 2 * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines.test 6 7 import org.junit.Test 8 import kotlin.test.* 9 10 class TestCoroutineExceptionHandlerTest { 11 @Test whenExceptionsCaught_avaliableViaPropertynull12 fun whenExceptionsCaught_avaliableViaProperty() { 13 val subject = TestCoroutineExceptionHandler() 14 val expected = IllegalArgumentException() 15 subject.handleException(subject, expected) 16 assertEquals(listOf(expected), subject.uncaughtExceptions) 17 } 18 }