MCPcopy Create free account
hub / github.com/apache/fory / TestNonAsciiEncoding

Function TestNonAsciiEncoding

go/fory/meta/meta_string_test.go:93–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

91}
92
93func TestNonAsciiEncoding(t *testing.T) {
94 encoder := NewEncoder('.', '_')
95
96 data, err := encoder.Encode("こんにちは") // Non-ASCII String
97 require.NoError(t, err)
98 require.Equal(t, UTF_8, data.GetEncoding(), "Encoding should be UTF-8 for non-ASCII strings")
99}
100
101func TestEncodeWithEncodingNonAscii(t *testing.T) {
102 encoder := NewEncoder('.', '_')

Callers

nothing calls this directly

Calls 4

EncodeMethod · 0.95
NewEncoderFunction · 0.85
GetEncodingMethod · 0.80
EqualMethod · 0.45

Tested by

no test coverage detected