Delete color_test.go

This commit is contained in:
12private12 2025-08-12 23:19:18 +08:00 committed by GitHub
parent 39e3fd24a0
commit 4f9d9a9e5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 24 deletions

View File

@ -1,24 +0,0 @@
package pixel_test
import (
"fmt"
"image/color"
"testing"
"github.com/faiface/pixel"
)
func BenchmarkColorToRGBA(b *testing.B) {
types := []color.Color{
color.NRGBA{R: 124, G: 14, B: 230, A: 42}, // slowest
color.RGBA{R: 62, G: 32, B: 14, A: 63}, // faster
pixel.RGB(0.8, 0.2, 0.5).Scaled(0.712), // fastest
}
for _, col := range types {
b.Run(fmt.Sprintf("From %T", col), func(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = pixel.ToRGBA(col)
}
})
}
}