From 996633ef54288d91d4df747e1714ec8729bfe4b8 Mon Sep 17 00:00:00 2001 From: alessio Date: Fri, 11 Aug 2017 21:03:58 +0200 Subject: [PATCH] style test --- style/style_test.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 style/style_test.go diff --git a/style/style_test.go b/style/style_test.go new file mode 100644 index 0000000..b424576 --- /dev/null +++ b/style/style_test.go @@ -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) + } +} \ No newline at end of file