Changed add method to have the first element be a slice

This commit is contained in:
btracey
2013-07-18 19:30:54 -07:00
parent 135f9bf92d
commit b7c4b27fb3
3 changed files with 73 additions and 8 deletions

View File

@@ -17,7 +17,7 @@ const (
func AreSlicesEqual(t *testing.T, truth, comp []float64, str string) {
if !Eq(comp, truth, EQTOLERANCE) {
t.Errorf(str+"Expected %v, returned %v", truth, comp)
t.Errorf(str+". Expected %v, returned %v", truth, comp)
}
}
@@ -367,7 +367,7 @@ func BenchmarkMinHuge(b *testing.B) {
func benchmarkAdd(b *testing.B, s ...[]float64) {
b.StartTimer()
for i := 0; i < b.N; i++ {
Add(s...)
Add(s[0], s[1:]...)
}
}