MCPcopy Create free account
hub / github.com/imroc/req / TestIsStringEmpty

Function TestIsStringEmpty

internal/util/util_test.go:45–61  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestIsStringEmpty(t *testing.T) {
46 tests := []struct {
47 s string
48 expected bool
49 }{
50 {"", true},
51 {" ", true},
52 {"\t\n", true},
53 {"a", false},
54 {" a ", false},
55 }
56 for _, tt := range tests {
57 if got := IsStringEmpty(tt.s); got != tt.expected {
58 t.Errorf("IsStringEmpty(%q) = %v, want %v", tt.s, got, tt.expected)
59 }
60 }
61}
62
63func TestCutString(t *testing.T) {
64 tests := []struct {

Callers

nothing calls this directly

Calls 2

IsStringEmptyFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…