Added terminal detection
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
package color_test
|
||||
|
||||
import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"git.akyoto.dev/go/color"
|
||||
@ -19,24 +18,6 @@ func BenchmarkLCH(b *testing.B) {
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkFprint(b *testing.B) {
|
||||
color.Terminal = true
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.Fprint(io.Discard, "")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkFprintRaw(b *testing.B) {
|
||||
color.Terminal = false
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
c.Fprint(io.Discard, "")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkPrint(b *testing.B) {
|
||||
color.Terminal = true
|
||||
c := color.RGB(1.0, 1.0, 1.0)
|
||||
|
Reference in New Issue
Block a user