MCPcopy
hub / github.com/tidwall/gjson / testvalid

Function testvalid

gjson_test.go:1018–1024  ·  view source on GitHub ↗
(t *testing.T, json string, expect bool)

Source from the content-addressed store, hash-verified

1016`
1017
1018func testvalid(t *testing.T, json string, expect bool) {
1019 t.Helper()
1020 _, ok := validpayload([]byte(json), 0)
1021 if ok != expect {
1022 t.Fatal("mismatch")
1023 }
1024}
1025
1026func TestValidBasic(t *testing.T) {
1027 testvalid(t, "0", true)

Callers 1

TestValidBasicFunction · 0.85

Calls 1

validpayloadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…