Update template_functions_test.go
Cette révision appartient à :
Parent
abaec4015f
révision
442fa10a1c
|
@ -721,6 +721,32 @@ func Teststrcmp(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestToString(t *testing.T) {
|
||||
var tests = []struct {
|
||||
TestInt int
|
||||
Expected string
|
||||
}{
|
||||
{
|
||||
TestInt: 0,
|
||||
Expected: "",
|
||||
},
|
||||
{
|
||||
TestInt: 1,
|
||||
Expected: "1",
|
||||
},
|
||||
{
|
||||
TestInt: -1,
|
||||
Expected: "-1",
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
value := toString(test.TestInt)
|
||||
if value != test.Expected {
|
||||
t.Errorf("Unexpected value from the function toString, got '%t', wanted '%t'", value, test.string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetTheme(t *testing.T) {
|
||||
var tests = []struct {
|
||||
domainName []string
|
||||
|
|
Référencer dans un nouveau ticket