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

Function TestEmoji

gjson_test.go:67–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestEmoji(t *testing.T) {
68 const input = `{"utf8":"Example emoji, KO: \ud83d\udd13, \ud83c\udfc3 ` +
69 `OK: \u2764\ufe0f "}`
70 value := Get(input, "utf8")
71 var s string
72 json.Unmarshal([]byte(value.Raw), &s)
73 if value.String() != s {
74 t.Fatalf("expected '%v', got '%v'", s, value.String())
75 }
76}
77
78func testEscapePath(t *testing.T, json, path, expect string) {
79 if Get(json, path).String() != expect {

Callers

nothing calls this directly

Calls 2

GetFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…