go test -v
(t *testing.T)
| 29 | // go test -v |
| 30 | |
| 31 | func TestBytesToString(t *testing.T) { |
| 32 | data := make([]byte, 1024) |
| 33 | for range 100 { |
| 34 | _, err := cRand.Read(data) |
| 35 | if err != nil { |
| 36 | t.Fatal(err) |
| 37 | } |
| 38 | if rawBytesToStr(data) != BytesToString(data) { |
| 39 | t.Fatal("don't match") |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func TestBytesToStringEmpty(t *testing.T) { |
| 45 | if got := BytesToString([]byte{}); got != "" { |
nothing calls this directly
no test coverage detected