diff --git a/action_test.go b/action_test.go index 3ff3e71..426d80d 100644 --- a/action_test.go +++ b/action_test.go @@ -185,7 +185,7 @@ func writeQueryToPrompt(t *testing.T, message string) { t.Logf("End of string reached") break } - t.Errorf("Failed to decode run in string: %s", r) + t.Errorf("Failed to decode run in string: %#U", r) return } diff --git a/config_test.go b/config_test.go index 844e6ec..97f61bc 100644 --- a/config_test.go +++ b/config_test.go @@ -32,7 +32,7 @@ func TestReadRC(t *testing.T) { if err := json.Unmarshal([]byte(txt), cfg); err != nil { t.Fatalf("Error unmarshaling json: %s", err) } - t.Logf("%#q", cfg) + t.Logf("%#v", cfg) } type stringsToStyleTest struct { diff --git a/layout_test.go b/layout_test.go index 8d64d40..0037624 100644 --- a/layout_test.go +++ b/layout_test.go @@ -58,7 +58,7 @@ func TestLayoutType(t *testing.T) { for _, l := range layouts { valid := IsValidLayoutType(l.value) if valid != l.expectOK { - t.Errorf("LayoutType %s, expected IsValidLayoutType to return %s, but got %s", + t.Errorf("LayoutType %s, expected IsValidLayoutType to return %t, but got %t", l.value, l.expectOK, valid, @@ -74,7 +74,7 @@ func TestPrintScreen(t *testing.T) { makeVerifier := func(initX, initY int, fill bool) func(string) { return func(msg string) { i.reset() - t.Logf("Checking printScreen(%d, %d, %s, %s)", initX, initY, msg, fill) + t.Logf("Checking printScreen(%d, %d, %s, %t)", initX, initY, msg, fill) width := utf8.RuneCountInString(msg) printScreen(initX, initY, termbox.ColorDefault, termbox.ColorDefault, msg, fill) events := i.events["SetCell"] diff --git a/view_test.go b/view_test.go index 2cd7e61..2c0daed 100644 --- a/view_test.go +++ b/view_test.go @@ -23,20 +23,20 @@ func TestMergeAttribute(t *testing.T) { for _, c := range tests { if m := mergeAttribute(colors[c[0]], colors[c[1]]); m != colors[c[2]] { - t.Errorf("(%s + %s) expected %s, got %s", c[0], c[1], colors[c[2]], m) + t.Errorf("(%s + %s) expected %d(%s), got %d", c[0], c[1], colors[c[2]], c[2], m) } } // merge with white for _, c := range colors { if m := mergeAttribute(c, colors["white"]); m != colors["white"] { - t.Errorf("expected white(%s), got %s", colors["white"], m) + t.Errorf("expected white(%d), got %d", colors["white"], m) } } // merge attributes if m := mergeAttribute(termbox.AttrBold|colors["red"], termbox.AttrUnderline|colors["cyan"]); m != termbox.AttrBold|termbox.AttrUnderline|colors["white"] { - t.Errorf("expected %s, got %s", termbox.AttrBold|termbox.AttrUnderline|colors["white"], m) + t.Errorf("expected %d, got %d", termbox.AttrBold|termbox.AttrUnderline|colors["white"], m) } }