assertTrue > assertEqual(true,...)
All checks were successful
Go / test (push) Successful in 5s

This commit is contained in:
Adam Jeniski 2025-11-06 11:15:15 -10:00
parent 7e5a65e281
commit 0324724fb7

View File

@ -81,7 +81,7 @@ func TestStringifyIntList(t *testing.T) {
myList := intListGen().Draw(t, "myList") myList := intListGen().Draw(t, "myList")
s := myList.String() s := myList.String()
r := regexp.MustCompile(`^\([\d\s-]*\)$`) r := regexp.MustCompile(`^\([\d\s-]*\)$`)
assert.Equal(t, true, r.Match([]byte(s)), s+" looks like a stringified list") assert.True(t, r.Match([]byte(s)), s+" looks like a stringified list")
if !myList.IsEmpty() { if !myList.IsEmpty() {
assert.Equal(t, myList.Len(), strings.Count(s, " ")+1, "number of spaces in string should match count of elements") assert.Equal(t, myList.Len(), strings.Count(s, " ")+1, "number of spaces in string should match count of elements")
} else { } else {