add some tests

This commit is contained in:
Henrique Dias committed 2017-04-25 10:51:48 +01:00
1 parent 9a6a0dfbbb
commit 1f52d5d0fd
4 files changed
+184 -4

No files matched your search

+3 -3
View File
@@ -36,10 +36,10 @@ func RuneToStringFormat(mark rune) (string, error) {
return "yaml", nil
case '+':
return "toml", nil
case '{':
case '{', '}':
return "json", nil
default:
return "", errors.New("Unsupported format type.")
return "", errors.New("Unsupported format type")
}
}
@@ -53,6 +53,6 @@ func StringFormatToRune(format string) (rune, error) {
case "json":
return '{', nil
default:
return '0', errors.New("Unsupported format type.")
return '0', errors.New("Unsupported format type")
}
}