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

Function TestEscapeString

json/json_test.go:1842–1853  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1840}
1841
1842func TestEscapeString(t *testing.T) {
1843 b := Escape(`value`)
1844 x := []byte(`"value"`)
1845
1846 if !bytes.Equal(x, b) {
1847 t.Error(
1848 "unexpected encoding:",
1849 "expected", string(x),
1850 "got", string(b),
1851 )
1852 }
1853}
1854
1855func TestAppendEscape(t *testing.T) {
1856 t.Run("basic", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

EscapeFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…