mirror of https://github.com/01-edu/public.git
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.
30 lines
521 B
30 lines
521 B
package student_test |
|
|
|
import ( |
|
"testing" |
|
|
|
solutions "./solutions" |
|
|
|
student "./student" |
|
"github.com/01-edu/z01" |
|
) |
|
|
|
func TestAlphaCount(t *testing.T) { |
|
var arr []string |
|
for l := 0; l < 7; l++ { |
|
a := z01.RandIntBetween(5, 20) |
|
b := z01.RandASCII() |
|
str := z01.RandStr(a, b) |
|
arr = append(arr, str) |
|
} |
|
|
|
arr = append(arr, " ") |
|
|
|
// example from the subject |
|
arr = append(arr, "Hello 78 World! 4455 /") |
|
|
|
for i := 0; i < len(arr); i++ { |
|
z01.Challenge(t, student.AlphaCount, solutions.AlphaCount, arr[i]) |
|
|
|
} |
|
}
|
|
|