1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
14 func TestMarshalFiltersWithNanoseconds(t *testing.T) {
16 t0str := t0.Format(time.RFC3339Nano)
17 buf, err := json.Marshal([]Filter{
18 {Attr: "modified_at", Operator: "=", Operand: t0}})
22 if expect := []byte(`[["modified_at","=","` + t0str + `"]]`); 0 != bytes.Compare(buf, expect) {
23 t.Errorf("Encoded as %q, expected %q", buf, expect)