more tools to deal with Lyng exeption in Kotlin

This commit is contained in:
sergeych committed 2026-01-08 12:42:29 +01:00
1 parent c12804a806
commit 2acb60697d
6 files changed
+53 -5

No files matched your search

@@ -4671,5 +4671,17 @@ class ScriptTest {
// source name, in our case, is is "tc2":
assertContains(x1.message!!, "tc2")
}
@Test
fun testLyngToKotlinExceptionHelpers() = runTest {
var x = evalNamed( "tc1","""
IllegalArgumentException("test3")
""".trimIndent())
assertEquals("""
tc1:1:1: test3
at tc1:1:1: IllegalArgumentException("test3")
""".trimIndent(),
x.getLyngExceptionMessageWithStackTrace()
)
}
}