Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Nov 28, 2023
1 parent 9992339 commit 28bb8ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func TestMarshalTextIndent(t *testing.T) {
}

func TestValueMarshalJSON(t *testing.T) {
now := time.Now()
tests := []struct {
name string
value types.Value
Expand All @@ -123,7 +124,7 @@ func TestValueMarshalJSON(t *testing.T) {
{"bool", types.NewBoolValue(true), "true"},
{"int", types.NewIntegerValue(10), "10"},
{"double", types.NewDoubleValue(10.1), "10.1"},
{"time", types.NewTimestampValue(time.Now()), `"` + time.Now().UTC().Format(time.RFC3339Nano) + `"`},
{"time", types.NewTimestampValue(now), `"` + now.UTC().Format(time.RFC3339Nano) + `"`},
{"double with no decimal", types.NewDoubleValue(10), "10"},
{"big double", types.NewDoubleValue(1e15), "1e+15"},
{"document", types.NewDocumentValue(document.NewFieldBuffer().Add("a", types.NewIntegerValue(10))), "{\"a\": 10}"},
Expand Down

0 comments on commit 28bb8ce

Please sign in to comment.