(t *testing.T)
| 192 | } |
| 193 | |
| 194 | func TestUnicodeToZh(t *testing.T) { |
| 195 | input := "\\u4e2d\\u6587" |
| 196 | expected := "中文" |
| 197 | output, err := unicodeToZh(input) |
| 198 | if err != nil { |
| 199 | t.Errorf("unicodeToZh(%q) returned error %v", input, err) |
| 200 | } |
| 201 | if output != expected { |
| 202 | t.Errorf("unicodeToZh(%q) = %q, want %q", input, output, expected) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func TestConvertUnicode(t *testing.T) { |
| 207 | testStruct := struct { |
nothing calls this directly
no test coverage detected