MCPcopy Index your code
hub / github.com/golang/example / TestString

Function TestString

hello/reverse/reverse_test.go:9–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7import "testing"
8
9func TestString(t *testing.T) {
10 for _, c := range []struct {
11 in, want string
12 }{
13 {"Hello, world", "dlrow ,olleH"},
14 {"Hello, 世界", "界世 ,olleH"},
15 {"", ""},
16 } {
17 got := String(c.in)
18 if got != c.want {
19 t.Errorf("String(%q) == %q, want %q", c.in, got, c.want)
20 }
21 }
22}

Callers

nothing calls this directly

Calls 1

StringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…