]>
git.proxmox.com Git - ceph.git/blob - ceph/src/utf8proc/test/valid.c
5 int main(int argc
, char **argv
)
9 (void) argc
; /* unused */
10 (void) argv
; /* unused */
12 /* some simple sanity tests of */
13 for (c
= 0; c
< 0xd800; c
++) {
14 if (!utf8proc_codepoint_valid(c
)) {
15 fprintf(stderr
, "Failed: codepoint_valid(%04x) -> false\n", c
);
19 for (;c
< 0xe000; c
++) {
20 if (utf8proc_codepoint_valid(c
)) {
21 fprintf(stderr
, "Failed: codepoint_valid(%04x) -> true\n", c
);
25 for (;c
< 0x110000; c
++) {
26 if (!utf8proc_codepoint_valid(c
)) {
27 fprintf(stderr
, "Failed: codepoint_valid(%06x) -> false\n", c
);
31 for (;c
< 0x110010; c
++) {
32 if (utf8proc_codepoint_valid(c
)) {
33 fprintf(stderr
, "Failed: codepoint_valid(%06x) -> true\n", c
);
37 check(!error
, "utf8proc_codepoint_valid FAILED %d tests.", error
);
38 printf("Validity tests SUCCEEDED.\n");