21 test_is_single (int i
)
1915 int def_isascii (int i
) { return isascii(i
); }
1916 int def_iscntrl (int i
) { return iscntrl(i
); }
1917 int def_isspace (int i
) { return isspace(i
); }
1918 int def_isprint (int i
) { return isprint(i
); }
1919 int def_isalnum (int i
) { return isalnum(i
); }
1920 int def_isdigit (int i
) { return isdigit(i
); }
1921 int def_isxdigit (int i
) { return isxdigit(i
); }
1922 int def_isalpha (int i
) { return isalpha(i
); }
1923 int def_isupper (int i
) { return isupper(i
); }
1924 int def_islower (int i
) { return islower(i
); }
1925 int def_isgraph (int i
) { return isgraph(i
); }
1926 int def_ispunct (int i
) { return ispunct(i
); }
1927 int def_tolower (int i
) { return tolower(i
); }
1928 int def_toupper (int i
) { return toupper(i
); }
1929 int def_toascii (int i
) { return toascii(i
); }
1930 int def__tolower (int i
) { return _tolower(i
); }
1931 int def__toupper (int i
) { return _toupper(i
); }
1934 test_is_set (int (*func
)(),
1940 for (i
= 0; i
< 255; i
++) {
1941 int r
= func(i
) != 0;
1946 printf("%s:%d wrong result, is %d shouldbe %d\n", name
, i
, r
,*p
);
1952 test_to_set (int (*func
)(),
1960 for (i
= low
; i
<= high
; i
++) {
1966 printf("%s:%d wrong result, is %d shouldbe %d\n", name
, i
, r
,*p
);
1994 test_is_set(def_isalnum
, "isalnum define", &myalnum
);
1995 test_is_set(def_isalpha
, "isalpha define", &myalpha
);
1996 test_is_set(def_isascii
, "isascii define", &myascii
);
1997 test_is_set(def_iscntrl
, "iscntrl define", &mycntrl
);
1998 test_is_set(def_isdigit
, "isdigit define", &mydigit
);
1999 test_is_set(def_isgraph
, "isgraph define", &mygraph
);
2000 test_is_set(def_islower
, "islower define", &mylower
);
2001 test_is_set(def_isprint
, "isprint define", &myprint
);
2002 test_is_set(def_ispunct
, "ispunct define", &mypunct
);
2003 test_is_set(def_isspace
, "isspace define", &myspace
);
2004 test_is_set(def_isupper
, "isupper define", &myupper
);
2005 test_is_set(def_isxdigit
, "isxdigit define", &myxdigit
);
2006 test_is_set(isalnum
, "isalnum function", &myalnum
);
2007 test_is_set(isalpha
, "isalpha function", &myalpha
);
2008 test_is_set(isascii
, "isascii function", &myascii
);
2009 test_is_set(iscntrl
, "iscntrl function", &mycntrl
);
2010 test_is_set(isgraph
, "isgraph function", &mygraph
);
2011 test_is_set(islower
, "islower function", &mylower
);
2012 test_is_set(isprint
, "isprint function", &myprint
);
2013 test_is_set(ispunct
, "ispunct function", &mypunct
);
2014 test_is_set(isspace
, "isspace function", &myspace
);
2015 test_is_set(isupper
, "isupper function", &myupper
);
2016 test_is_set(isxdigit
, "isxdigit function", &myxdigit
);
2017 test_to_set(_tolower
, "_tolower function", &setlower
, 'A','Z');
2018 test_to_set(_toupper
, "_toupper function", &setupper
, 'a','z');
2019 test_to_set(def__tolower
, "_tolower define", &setlower
, 'A','Z');
2020 test_to_set(def__toupper
, "_toupper define", &setupper
, 'a','z');
2021 test_to_set(def_toascii
, "toascii define", &setascii
, 0,255);
2022 test_to_set(def_tolower
, "tolower define", &setlower
, 0,255);
2023 test_to_set(def_toupper
, "toupper define", &setupper
, 0,255);
2024 test_to_set(toascii
, "toascii function", &setascii
, 0,255);
2025 test_to_set(tolower
, "tolower function", &setlower
, 0,255);
2026 test_to_set(toupper
, "toupper function", &setupper
, 0,255);