(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestFTJsons(t *testing.T) { |
| 23 | ft := FileTime{"something.txt", time.Now().Unix(), true} |
| 24 | marshalled, err := json.Marshal(ft) |
| 25 | if err != nil { |
| 26 | t.Error("FileTime failed to marshal:", err) |
| 27 | } |
| 28 | if bytes.NewBuffer(marshalled).String() == "{}" { |
| 29 | t.Error(ft, "marshals as empty object") |
| 30 | } |
| 31 | |
| 32 | } |
| 33 | |
| 34 | func TestRoundTrip(t *testing.T) { |
| 35 | watches := NewFileTimes() |