The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/utils/utils_test.go

17 lines
286 B

package utils
import "testing"
func TestConvertIntoInts(t *testing.T) {
data := "1,2,3,4"
res := ConvertIntoInts(data)
if len(res) != 4 {
t.Errorf("Array length parsed incorrect.")
}
for id, value := range res {
if value != id+1 {
t.Errorf("Parsing incorrect.")
}
}
}