MCPcopy Create free account
hub / github.com/segmentio/encoding / TestMarshalNumberZeroVal

Function TestMarshalNumberZeroVal

json/golang_decode_test.go:1003–1013  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1001}
1002
1003func TestMarshalNumberZeroVal(t *testing.T) {
1004 var n Number
1005 out, err := Marshal(n)
1006 if err != nil {
1007 t.Fatal(err)
1008 }
1009 outStr := string(out)
1010 if outStr != "0" {
1011 t.Fatalf("Invalid zero val for Number: %q", outStr)
1012 }
1013}
1014
1015func TestMarshalEmbeds(t *testing.T) {
1016 top := &Top{

Callers

nothing calls this directly

Calls 1

MarshalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…