[tests] makes check_stacktrace_format enabled again

This commit is contained in:
Vasily Levchenko
2019-05-22 12:42:31 +03:00
parent 4ee31d139d
commit 479c91d880
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -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)
}
}