(t *testing.T)
| 87 | } |
| 88 | |
| 89 | func TestShortIDString(t *testing.T) { |
| 90 | id, _ := DeviceIDFromString(formatted) |
| 91 | |
| 92 | sid := id.Short().String() |
| 93 | // keep consistent with ShortIDStringLength in lib/protocol/deviceid.go |
| 94 | if len(sid) != 7 { |
| 95 | t.Errorf("Wrong length for short ID: got %d, want 7", len(sid)) |
| 96 | } |
| 97 | |
| 98 | want := formatted[:len(sid)] |
| 99 | if sid != want { |
| 100 | t.Errorf("Wrong short ID: got %q, want %q", sid, want) |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | func TestDeviceIDFromBytes(t *testing.T) { |
| 105 | id0, _ := DeviceIDFromString(formatted) |
nothing calls this directly
no test coverage detected