Add signature tests, fix tests

This commit is contained in:
Aron Wussler 2019-05-14 16:08:25 +00:00 committed by Daniel Huigens
parent 4081e693fc
commit b42e382224
8 changed files with 121 additions and 27 deletions

View file

@ -2,14 +2,18 @@ package crypto
import (
"io/ioutil"
"strings"
)
var err error
func readTestFile(name string) string {
func readTestFile(name string, trimNewlines bool) string {
data, err := ioutil.ReadFile("testdata/" + name)
if err != nil {
panic(err)
}
if trimNewlines {
return strings.TrimRight(string(data), "\n")
}
return string(data)
}