summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adapters/gtest/results.go2
-rw-r--r--cmd/planr/sub/cli.go34
2 files changed, 33 insertions, 3 deletions
diff --git a/adapters/gtest/results.go b/adapters/gtest/results.go
index c556749..0e96edc 100644
--- a/adapters/gtest/results.go
+++ b/adapters/gtest/results.go
@@ -55,7 +55,7 @@ func failureMsg(failures []gFailure) string {
failure_msg := ""
for _, failure := range failures {
- failure_msg += failure.Failure
+ failure_msg += failure.Failure + "\n"
}
return failure_msg
diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go
index 42d1c81..2bcaed9 100644
--- a/cmd/planr/sub/cli.go
+++ b/cmd/planr/sub/cli.go
@@ -42,6 +42,34 @@ func pprintLabeled(label, value string) {
fmt.Println(value)
}
+const (
+ FENCE_WIDTH = 80
+)
+
+func pprintFenced(title, value string) {
+ wingWidth := FENCE_WIDTH - len(title) - 2
+
+ for i := 0; i < wingWidth / 2; i++ {
+ fmt.Print("-")
+ }
+
+ fmt.Printf(" %s ", title)
+
+ for i := 0; i < wingWidth / 2; i++ {
+ fmt.Print("-")
+ }
+
+ fmt.Println()
+
+ fmt.Print(value)
+
+ for i := 0; i < FENCE_WIDTH; i++ {
+ fmt.Print("-")
+ }
+
+ fmt.Println()
+}
+
func tcStatusLine(tc planr.TestCase) {
title := tcTitle(tc)
status := tcStatus(tc)
@@ -68,11 +96,13 @@ func tcPprint(tc planr.TestCase) {
}
if tc.Result.DebugOutput != "" {
- pprintLabeled("debug output", tc.Result.DebugOutput)
+ fmt.Println()
+ pprintFenced("compilation output", tc.Result.DebugOutput);
}
if tc.Result.FailureMsg != "" {
- pprintLabeled("failure", tc.Result.FailureMsg);
+ fmt.Println()
+ pprintFenced("test output", tc.Result.FailureMsg);
}
fmt.Println()