(t *testing.T)
| 204 | } |
| 205 | |
| 206 | func TestConvertUnicode(t *testing.T) { |
| 207 | testStruct := struct { |
| 208 | ValueBeforeParsed string |
| 209 | ValueAfterParsed string |
| 210 | }{ |
| 211 | ValueBeforeParsed: "Hello, \\u4e16\\u754c!", |
| 212 | ValueAfterParsed: "--", |
| 213 | } |
| 214 | |
| 215 | err := convertUnicode(&testStruct) |
| 216 | if err != nil { |
| 217 | t.Errorf("Unexpected error: %v", err) |
| 218 | } |
| 219 | |
| 220 | expectedBefore := "Hello, 世界!" |
| 221 | if testStruct.ValueBeforeParsed != expectedBefore { |
| 222 | t.Errorf("Expected ValueBeforeParsed to be %q, but got %q", expectedBefore, testStruct.ValueBeforeParsed) |
| 223 | } |
| 224 | |
| 225 | expectedAfter := "" |
| 226 | if testStruct.ValueAfterParsed != expectedAfter { |
| 227 | t.Errorf("Expected ValueAfterParsed to be %q, but got %q", expectedAfter, testStruct.ValueAfterParsed) |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | func TestGenerateDomainAccountIdForUsers(t *testing.T) { |
| 232 | connectionId := uint64(123) |
nothing calls this directly
no test coverage detected