Delete color_test.go
This commit is contained in:
parent
39e3fd24a0
commit
4f9d9a9e5e
|
@ -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)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue