fix #58 improper toString overload processing in Lyng

fix #57 Exception#getStackTrace()
ref #56 StackTraceEntry is serializable now
This commit is contained in:
sergeych committed 2025-08-22 00:02:23 +03:00
1 parent 8d1cafae80
commit 4b613fda7c
30 files changed
+250 -119

No files matched your search

+3 -3
View File
@@ -177,11 +177,11 @@ suspend fun DocTest.test(_scope: Scope? = null) {
scope.apply {
addFn("println") {
if( bookMode ) {
println("${currentTest.fileNamePart}:${currentTest.line}> ${args.joinToString(" "){it.asStr.value}}")
println("${currentTest.fileNamePart}:${currentTest.line}> ${args.map{it.toString(this).value}.joinToString(" ")}")
}
else {
for ((i, a) in args.withIndex()) {
if (i > 0) collectedOutput.append(' '); collectedOutput.append(a.asStr.value)
if (i > 0) collectedOutput.append(' '); collectedOutput.append(a.toString(this).value)
collectedOutput.append('\n')
}
}
@@ -194,7 +194,7 @@ suspend fun DocTest.test(_scope: Scope? = null) {
} catch (e: Throwable) {
error = e
null
}?.inspect()?.replace(Regex("@\\d+"), "@...")
}?.inspect(scope)?.replace(Regex("@\\d+"), "@...")
if (bookMode) {
if (error != null) {