Skip to content

Commit 3c164ae

Browse files
committed
Added a test
It's still pretty bad. I'll add more, I promise
1 parent 211d8e3 commit 3c164ae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

spark_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package spark
2+
3+
import (
4+
"testing"
5+
)
6+
7+
func TestSpark(t *testing.T) {
8+
var (
9+
// Wish I could use constant slices...
10+
in = []float64{1, 2, 3, 4, 5, 6, 7, 8}
11+
out = "▁▂▃▄▅▆▇█"
12+
)
13+
if x := Spark(in); x != out {
14+
t.Errorf("Spark(%v) = %v, want %v", in, x, out)
15+
}
16+
}

0 commit comments

Comments
 (0)