(t *testing.T)
| 169 | } |
| 170 | |
| 171 | func TestGenerateID(t *testing.T) { |
| 172 | id1 := generateID() |
| 173 | id2 := generateID() |
| 174 | |
| 175 | if id1 == "" { |
| 176 | t.Error("generateID() returned empty string") |
| 177 | } |
| 178 | if id1 == id2 { |
| 179 | t.Error("generateID() returned duplicate IDs") |
| 180 | } |
| 181 | if len(id1) != 32 { // 16 bytes = 32 hex chars |
| 182 | t.Errorf("generateID() length = %d, want 32", len(id1)) |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | func TestMustMarshal(t *testing.T) { |
| 187 | payload := ChatPayload{Message: "test"} |
nothing calls this directly
no test coverage detected