(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestRGBToHEX(t *testing.T) { |
| 36 | for i := 0; i < len(RGB); i++ { |
| 37 | args := RGB[i] |
| 38 | expected := HEX[i] |
| 39 | result := RGBToHEX(args[0], args[1], args[2]) |
| 40 | if result != expected { |
| 41 | t.Errorf("RGBToHEX(%d,%d,%d) = %d; want %d", |
| 42 | args[0], args[1], args[2], result, expected) |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func BenchmarkRGBToHEX(b *testing.B) { |
| 48 | for i := 0; i < b.N; i++ { |
nothing calls this directly
no test coverage detected