(t *testing.T)
| 217 | } |
| 218 | |
| 219 | func TestUniqueChar(t *testing.T) { |
| 220 | input := []rune{'a', 'b', 'a', 'c', 'b', 'd'} |
| 221 | result := uniqueChar(input) |
| 222 | |
| 223 | // Check that result has no duplicates |
| 224 | seen := make(map[rune]bool) |
| 225 | for _, r := range result { |
| 226 | if seen[r] { |
| 227 | t.Errorf("Duplicate rune found: %c", r) |
| 228 | } |
| 229 | seen[r] = true |
| 230 | } |
| 231 | |
| 232 | if len(result) > len(input) { |
| 233 | t.Error("Result should not have more elements than input") |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | func TestAllIntItemEqual(t *testing.T) { |
| 238 | tests := []struct { |
nothing calls this directly
no test coverage detected