From eeb719e7baa6de3a5a0379287af324bb0898af20 Mon Sep 17 00:00:00 2001 From: Philippe Suter <philippe.suter@gmail.com> Date: Wed, 19 Dec 2012 14:25:13 +0100 Subject: [PATCH] Truncate fun. names to fit in AnalysisReport table. --- .../scala/leon/verification/VerificationReport.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/scala/leon/verification/VerificationReport.scala b/src/main/scala/leon/verification/VerificationReport.scala index caf39d0eb..f5c95cbf0 100644 --- a/src/main/scala/leon/verification/VerificationReport.scala +++ b/src/main/scala/leon/verification/VerificationReport.scala @@ -27,6 +27,14 @@ class VerificationReport(val conditions : Seq[VerificationCondition]) { object VerificationReport { def emptyReport : VerificationReport = new VerificationReport(Nil) + private def fit(str : String, maxLength : Int) : String = { + if(str.length <= maxLength) { + str + } else { + str.substring(0, maxLength - 1) + "…" + } + } + private val infoSep : String = "╟" + ("┄" * 83) + "╢\n" private val infoFooter : String = "╚" + ("═" * 83) + "╝" private val infoHeader : String = ". ┌─────────┐\n" + @@ -37,7 +45,7 @@ object VerificationReport { val timeStr = vc.time.map(t => "%-3.3f".format(t)).getOrElse("") "║ %-25s %-9s %9s %-8s %-10s %-7s %7s ║".format( - vc.funDef.id.toString, + fit(vc.funDef.id.toString, 25), vc.kind, vc.posInfo, vc.status, -- GitLab