1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Tweaking minor code issues

This commit is contained in:
Chris Cummer
2018-06-28 17:49:40 -07:00
parent 0b1ec96545
commit cf776cd1b9
6 changed files with 6 additions and 6 deletions

View File

@@ -1,33 +0,0 @@
package bargraphtests
import (
"testing"
. "github.com/senorprogrammer/wtf/wtf"
. "github.com/stretchr/testify/assert"
)
// MakeData - Create sample data
func makeData() [][2]int64 {
//this could come from config
const lineCount = 2
var stats [lineCount][2]int64
stats[0][1] = 1530122942
stats[0][0] = 100
stats[1][1] = 1530132942
stats[1][0] = 210
return stats[:]
}
//TestOutput of the bargraph make string (BuildStars) function
func TestOutput(t *testing.T) {
result := BuildStars(makeData(), 20, "*")
Equal(t, result, "Jan 18, 1970 -\t [red]*[white] - (100)\nJan 18, 1970 -\t [red]********************[white] - (210)\n")
}