MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / TestStringJsonMarshal

Function TestStringJsonMarshal

query/outputnode_test.go:118–138  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

116}
117
118func TestStringJsonMarshal(t *testing.T) {
119 inputs := []string{
120 "",
121 "0",
122 "true",
123 "1.909045927350",
124 "nil",
125 "null",
126 "<&>",
127 `quoted"str"ing`,
128 }
129
130 for _, input := range inputs {
131 gm, err := json.Marshal(input)
132 require.NoError(t, err)
133
134 sm := stringJsonMarshal(input)
135
136 require.Equal(t, gm, sm)
137 }
138}
139
140func TestFastJsonNode(t *testing.T) {
141 attrId := uint16(20)

Callers

nothing calls this directly

Calls 1

stringJsonMarshalFunction · 0.85

Tested by

no test coverage detected