(t *testing.T)
| 68 | } |
| 69 | |
| 70 | func TestToValidUTF8string(t *testing.T) { |
| 71 | for _, s := range []string{ |
| 72 | "https://goedge.cn/", |
| 73 | "提升mysql数据表写入速度", |
| 74 | "😆", |
| 75 | string([]byte{'a', 'b', 130, 131, 132, 133, 134, 'c'}), |
| 76 | } { |
| 77 | var u = utils.ToValidUTF8string(s) |
| 78 | t.Log(s, "["+types.String(len(s))+"]", "=>", u, "["+types.String(len(u))+"]") |
| 79 | } |
| 80 | } |
nothing calls this directly
no test coverage detected