Преглед на файлове

lib/logger, lib/model: Correct printf format strings in tests

This is a build (test) failure in Go 1.10.
Jakob Borg преди 7 години
родител
ревизия
6e0f64017a
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      lib/logger/logger_test.go
  2. 1 1
      lib/model/model_test.go

+ 1 - 1
lib/logger/logger_test.go

@@ -147,7 +147,7 @@ func TestRecorder(t *testing.T) {
 		t.Fatalf("unexpected line count: %d", len(lines))
 	}
 	if lines[0].Message != "hah" {
-		t.Errorf("incorrect line: %s", lines[0])
+		t.Errorf("incorrect line: %s", lines[0].Message)
 	}
 
 }

+ 1 - 1
lib/model/model_test.go

@@ -3082,7 +3082,7 @@ func TestVersionRestore(t *testing.T) {
 			t.Errorf("unexpected %s", name)
 		}
 		if len(vers) != cnt {
-			t.Errorf("%s: %s != %s", name, cnt, len(vers))
+			t.Errorf("%s: %d != %d", name, cnt, len(vers))
 		}
 		// Delete, so we can check if we didn't hit something we expect afterwards.
 		delete(expectedVersions, name)