[tests] makes check_stacktrace_format enabled again
This commit is contained in:
@@ -2081,7 +2081,7 @@ task extend_exception(type: RunKonanTest) {
|
||||
}
|
||||
|
||||
task check_stacktrace_format(type: RunStandaloneKonanTest) {
|
||||
disabled = true // !isAppleTarget(project)
|
||||
disabled = !isAppleTarget(project) || project.globalTestArgs.contains('-opt')
|
||||
flags = ['-g']
|
||||
source = "runtime/exceptions/check_stacktrace_format.kt"
|
||||
}
|
||||
|
||||
@@ -29,15 +29,14 @@ fun functionB() {
|
||||
functionA()
|
||||
}
|
||||
|
||||
const val depth = 5
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
try {
|
||||
functionB()
|
||||
} catch (e: Throwable) {
|
||||
val stacktrace = e.getStackTrace()
|
||||
if (stacktrace.size >= 3) {
|
||||
repeat(3) {
|
||||
checkStringFormat(stacktrace[it])
|
||||
}
|
||||
}
|
||||
assert(stacktrace.size >= depth)
|
||||
stacktrace.take(depth).forEach(::checkStringFormat)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user