MCPcopy Create free account
hub / github.com/cloudwego/netpoll / TestUnsafeStringToSlice

Function TestUnsafeStringToSlice

nocopy_linkbuffer_test.go:758–764  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

756}
757
758func TestUnsafeStringToSlice(t *testing.T) {
759 s := "hello world"
760 bs := unsafe.Slice(unsafe.StringData(s), len(s))
761 s = "hi, boy"
762 _ = s
763 Equal(t, string(bs), "hello world")
764}
765
766func TestLinkBufferIndexByte(t *testing.T) {
767 // clean & new

Callers

nothing calls this directly

Calls 2

SliceMethod · 0.65
EqualFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…