style test

This commit is contained in:
alessio 2017-08-11 21:03:58 +02:00
parent c5373ea0cd
commit 996633ef54
1 changed files with 34 additions and 0 deletions

34
style/style_test.go Normal file
View File

@ -0,0 +1,34 @@
package style
import (
"testing"
"fmt"
)
func TestColorBase_Regular(t *testing.T) {
c := new(colorBase)
strs := []string{"a", "b", "c"}
input := make([]interface{}, len(strs))
result := c.Bold(input)
expected := fmt.Sprint(input)
for i, s := range strs {
input[i] = s
}
if result != expected{
t.Error("Expected:", expected, "instead", result)
}
}
func TestColorBase_Bold(t *testing.T) {
c := new(colorBase)
strs := []string{"a", "b", "c"}
input := make([]interface{}, len(strs))
result := c.Bold(input)
expected := fmt.Sprint(input)
for i, s := range strs {
input[i] = s
}
if result != expected{
t.Error("Expected:", expected, "instead", result)
}
}