-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqr_trivial_test.v
45 lines (43 loc) · 1.54 KB
/
qr_trivial_test.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import qr
fn test_is_alphanumeric() {
assert qr.is_alphanumeric("") == true
assert qr.is_alphanumeric("0") == true
assert qr.is_alphanumeric("A") == true
assert qr.is_alphanumeric("a") == false
assert qr.is_alphanumeric(" ") == true
assert qr.is_alphanumeric(".") == true
assert qr.is_alphanumeric("*") == true
assert qr.is_alphanumeric(",") == false
assert qr.is_alphanumeric("|") == false
assert qr.is_alphanumeric("@") == false
assert qr.is_alphanumeric("XYZ") == true
assert qr.is_alphanumeric("XYZ!") == false
assert qr.is_alphanumeric("79068") == true
assert qr.is_alphanumeric("+123 ABC$") == true
assert qr.is_alphanumeric("\x01") == false
assert qr.is_alphanumeric("\x7F") == false
assert qr.is_alphanumeric("\x80") == false
assert qr.is_alphanumeric("\xC0") == false
assert qr.is_alphanumeric("\xFF") == false
}
fn test_is_numeric() {
assert qr.is_numeric("") == true
assert qr.is_numeric("0") == true
assert qr.is_numeric("A") == false
assert qr.is_numeric("a") == false
assert qr.is_numeric(" ") == false
assert qr.is_numeric(".") == false
assert qr.is_numeric("*") == false
assert qr.is_numeric(",") == false
assert qr.is_numeric("|") == false
assert qr.is_numeric("@") == false
assert qr.is_numeric("XYZ") == false
assert qr.is_numeric("XYZ!") == false
assert qr.is_numeric("79068") == true
assert qr.is_numeric("+123 ABC$") == false
assert qr.is_numeric("\x01") == false
assert qr.is_numeric("\x7F") == false
assert qr.is_numeric("\x80") == false
assert qr.is_numeric("\xC0") == false
assert qr.is_numeric("\xFF") == false
}