missing initial files + publishing

This commit is contained in:
sergeych committed 2023-11-22 23:56:18 +03:00
1 parent aaa8c436b0
commit f429cfe418
25 files changed
+870

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import kotlin.test.fail
inline fun <reified T: Throwable>assertThrows(f: ()->Unit): T {
val name = T::class.simpleName
try {
f()
fail("expected to throw $name but threw nothing")
}
catch(x: Throwable) {
if( x is T ) return x
fail("expected to throw $name but instead threw ${x::class.simpleName}: $x")
}
}