8 func TestMarshalJSON(t *testing.T) {
17 Value: PointInt64Value{
26 Value: PointDoubleValue{
30 `{"doubleValue":3.14}`,
35 Value: PointDistributionValue{
36 DistributionValue: &DistributionValue{
47 BucketOptions: &BucketOptionsExplicit{
55 `{"distributionValue":{"count":3,"sum":10,"bucket_options":{"explicit":{"bounds":[0,5]}},"buckets":[{"count":1},{"count":2}]}}`,
64 for _, tt := range tests {
65 t.Run(tt.name, func(t *testing.T) {
66 buf, err := tt.pt.MarshalJSON()
68 t.Fatalf("Got:\n%v\nWant:\n%v", err, nil)
71 if !reflect.DeepEqual(got, tt.want) {
72 t.Fatalf("Got:\n%s\nWant:\n%s", got, tt.want)