package check

import "testing"

func TestIsAllNum(t *testing.T) {
	type args struct {
		checkStr string
	}
	tests := []struct {
		name string
		args args
		want bool
	}{
		{
			name: "1-6",
			args: args{
				checkStr: "123456",
			},
			want: true,
		},
		{
			name: "a-6",
			args: args{
				checkStr: "a123456",
			},
			want: false,
		}, {
			name: "6-a",
			args: args{
				checkStr: "123456a",
			},
			want: false,
		}, {
			name: "6-cn",
			args: args{
				checkStr: "中文123456a",
			},
			want: false,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := IsAllNum(tt.args.checkStr); got != tt.want {
				t.Errorf("IsAllNum() = %v, want %v", got, tt.want)
			}
		})
	}
}
