my computer is about to die!!!

This commit is contained in:
didier.amyot committed 2014-11-01 16:00:06 -07:00
1 parent d863dc3bd1
commit e80f2601ab
13 files changed
+244 -11

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package helper
import (
"testing"
)
func TestJoinAsError(t *testing.T) {
var errs []string = nil
if JoinAsError(errs) != nil {
t.Error("expected no errors")
}
errs = make([]string, 0)
if JoinAsError(errs) != nil {
t.Error("expected no errors")
}
errs = []string{"a", "b"}
if JoinAsError(errs).Error() != "a\nb" {
t.Error("bad error")
}
}