diff --git a/cmd/syncthing/random_test.go b/cmd/syncthing/random_test.go index a04b96e5..5cff1ed8 100644 --- a/cmd/syncthing/random_test.go +++ b/cmd/syncthing/random_test.go @@ -46,7 +46,7 @@ func TestRandomString(t *testing.T) { for _, l := range []int{0, 1, 2, 3, 4, 8, 42} { s := randomString(l) if len(s) != l { - t.Errorf("Incorrect length %d != %s", len(s), l) + t.Errorf("Incorrect length %d != %d", len(s), l) } } diff --git a/internal/ignore/cache_test.go b/internal/ignore/cache_test.go index 155e22c3..27628520 100644 --- a/internal/ignore/cache_test.go +++ b/internal/ignore/cache_test.go @@ -25,7 +25,7 @@ func TestCache(t *testing.T) { res, ok := c.get("nonexistent") if res != false || ok != false { - t.Error("res %v, ok %v for nonexistent item", res, ok) + t.Errorf("res %v, ok %v for nonexistent item", res, ok) } // Set and check some items diff --git a/internal/model/deviceactivity_test.go b/internal/model/deviceactivity_test.go index 7d4ed2c9..a4f672d1 100644 --- a/internal/model/deviceactivity_test.go +++ b/internal/model/deviceactivity_test.go @@ -22,9 +22,9 @@ import ( ) func TestDeviceActivity(t *testing.T) { - n0 := protocol.DeviceID{1, 2, 3, 4} - n1 := protocol.DeviceID{5, 6, 7, 8} - n2 := protocol.DeviceID{9, 10, 11, 12} + n0 := protocol.DeviceID([32]byte{1, 2, 3, 4}) + n1 := protocol.DeviceID([32]byte{5, 6, 7, 8}) + n2 := protocol.DeviceID([32]byte{9, 10, 11, 12}) devices := []protocol.DeviceID{n0, n1, n2} na := newDeviceActivity()