This commit is contained in:
parent
72da3ec820
commit
0c9e3aa20b
@ -56,7 +56,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 string")
|
assert.Equal(t, true, r.Match([]byte(s)), s + " looks like a stringfied 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 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user