23 lines
301 B
Go
Raw Normal View History

2024-03-05 16:47:02 +00:00
package color_test
import (
"io"
"testing"
"git.akyoto.dev/go/color"
)
func BenchmarkRGB(b *testing.B) {
for i := 0; i < b.N; i++ {
color.RGB(1.0, 1.0, 1.0)
}
}
func BenchmarkFprint(b *testing.B) {
c := color.RGB(1.0, 1.0, 1.0)
for i := 0; i < b.N; i++ {
c.Fprint(io.Discard, "")
}
}