Skip to content

Commit

Permalink
tst(time) fix time test that broke with Go 1.9 (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
zegl committed Nov 12, 2017
1 parent 6ac946a commit f7723b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 0 additions & 2 deletions auto_map_encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ func (e *mapEncoder) encodeValue(op *riakMapOperation, itemKey string, f reflect
done = true
}

_ = time.Time{}

if !done {
subOp := op.Map(itemKey)

Expand Down
6 changes: 5 additions & 1 deletion time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ func TestTime(t *testing.T) {
t.Error("Fetch:", err.Error())
}

if val.TS != fetch.TS {
if val.TS.UnixNano() != fetch.TS.UnixNano() {
t.Error("Did not get same value back")
t.Logf("%+v", val.TS)
t.Logf("%+v", fetch.TS)
t.Logf("%+v", val.TS.UnixNano())
t.Logf("%+v", fetch.TS.UnixNano())
}
}

0 comments on commit f7723b0

Please sign in to comment.