charleskorn
12/08/2018, 9:43 PMrobstoll
12/09/2018, 8:14 PMcharleskorn
12/09/2018, 10:16 PMassert({ ... }).toThrow<...>()
), but I want to also make it clear for other cases that they should not throw - I can imply that it should succeed by just calling the function, but something like assert({ ... }).toNotThrow()
makes it really clear what my intention isrobstoll
12/11/2018, 3:50 PMfun <T : Throwable> Assert<T>.notToThrow () = this
charleskorn
12/11/2018, 3:53 PMThrowable
, then it’s already thrownrobstoll
12/11/2018, 3:56 PMcharleskorn
12/11/2018, 3:57 PMrobstoll
12/11/2018, 3:59 PMfun Assert<() -> Any?>.notToThrow () = subject ()
fun ThrowableThrown.Builder.notToThrow() = act()
notToThrow()
functioncharleskorn
01/20/2019, 1:05 AM