MCPcopy Create free account
hub / github.com/akalin/gopar / TestDecodeASCIIString

Function TestDecodeASCIIString

par2/string_test.go:10–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestDecodeASCIIString(t *testing.T) {
11 strings := []string{
12 "hello world",
13 "hello\nworld",
14 "\x01\x7f",
15 }
16
17 for _, s := range strings {
18 require.Equal(t, s, decodeNullPaddedASCIIString([]byte(s)))
19 }
20}
21
22func TestDecodeASCIIStringNullByte(t *testing.T) {
23 s := "hello\x00world"

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected