Improve test coverage for %lx, %hx, %hhx used with scanf

This commit is contained in:
Dmitry-Me 2017-11-06 23:13:48 +03:00
parent 4681c7e4cf
commit 95b37f665d
1 changed files with 61 additions and 0 deletions

View File

@ -1008,10 +1008,31 @@ private:
TEST_SCANF_WARN("%lx","unsigned long","bool");
TEST_SCANF_WARN("%lx","unsigned long","char");
TEST_SCANF_WARN("%lx","unsigned long","signed char");
TEST_SCANF_WARN("%lx","unsigned long","unsigned char");
TEST_SCANF_WARN("%lx","unsigned long","signed short");
TEST_SCANF_WARN("%lx","unsigned long","unsigned short");
TEST_SCANF_WARN("%lx","unsigned long","signed int");
TEST_SCANF_WARN("%lx","unsigned long","unsigned int");
TEST_SCANF_WARN("%lx","unsigned long","signed long");
TEST_SCANF_NOWARN("%lx","unsigned long","unsigned long");
TEST_SCANF_WARN("%lx","unsigned long","signed long long");
TEST_SCANF_WARN("%lx","unsigned long","unsigned long long");
TEST_SCANF_WARN("%lx","unsigned long","float");
TEST_SCANF_WARN("%lx","unsigned long","double");
TEST_SCANF_WARN("%lx","unsigned long","long double");
TEST_SCANF_WARN("%lx","unsigned long","void *");
TEST_SCANF_WARN_AKA("%lx","unsigned long","size_t","unsigned long","unsigned long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","ptrdiff_t", "signed long", "signed long long");
// TODO TEST_SCANF_WARN_AKA_WIN64("%lx","unsigned long","unsigned ptrdiff_t", "unsigned long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","intmax_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","uintmax_t","unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::size_t","unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::ptrdiff_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%lx","unsigned long","std::intptr_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA_WIN64("%lx","unsigned long","std::uintptr_t", "unsigned long long");
TEST_SCANF_WARN("%ld","long","bool");
TEST_SCANF_WARN("%ld","long","char");
@ -1097,9 +1118,29 @@ private:
TEST_SCANF_WARN("%hx", "unsigned short", "bool");
TEST_SCANF_WARN("%hx", "unsigned short", "char");
TEST_SCANF_WARN("%hx", "unsigned short", "signed char");
TEST_SCANF_WARN("%hx", "unsigned short", "unsigned char");
TEST_SCANF_WARN("%hx", "unsigned short", "signed short");
TEST_SCANF_NOWARN("%hx", "unsigned short", "unsigned short");
TEST_SCANF_WARN("%hx", "unsigned short", "signed int");
TEST_SCANF_WARN("%hx", "unsigned short", "unsigned int");
TEST_SCANF_WARN("%hx", "unsigned short", "signed long");
TEST_SCANF_WARN("%hx", "unsigned short", "unsigned long");
TEST_SCANF_WARN("%hx", "unsigned short", "signed long long");
TEST_SCANF_WARN("%hx", "unsigned short", "unsigned long long");
TEST_SCANF_WARN("%hx", "unsigned short", "float");
TEST_SCANF_WARN("%hx", "unsigned short", "double");
TEST_SCANF_WARN("%hx", "unsigned short", "long double");
TEST_SCANF_WARN("%hx", "unsigned short", "void *");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "size_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "ptrdiff_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "unsigned ptrdiff_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "intmax_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "uintmax_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "std::size_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "std::ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "std::ptrdiff_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "std::intptr_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hx", "unsigned short", "std::uintptr_t", "unsigned long", "unsigned long long");
@ -1148,7 +1189,27 @@ private:
TEST_SCANF_WARN("%hhx", "unsigned char", "char");
TEST_SCANF_WARN("%hhx", "unsigned char", "signed char");
TEST_SCANF_NOWARN("%hhx", "unsigned char", "unsigned char");
TEST_SCANF_WARN("%hhx", "unsigned char", "signed short");
TEST_SCANF_WARN("%hhx", "unsigned char", "unsigned short");
TEST_SCANF_WARN("%hhx", "unsigned char", "signed int");
TEST_SCANF_WARN("%hhx", "unsigned char", "unsigned int");
TEST_SCANF_WARN("%hhx", "unsigned char", "signed long");
TEST_SCANF_WARN("%hhx", "unsigned char", "unsigned long");
TEST_SCANF_WARN("%hhx", "unsigned char", "signed long long");
TEST_SCANF_WARN("%hhx", "unsigned char", "unsigned long long");
TEST_SCANF_WARN("%hhx", "unsigned char", "float");
TEST_SCANF_WARN("%hhx", "unsigned char", "double");
TEST_SCANF_WARN("%hhx", "unsigned char", "long double");
TEST_SCANF_WARN("%hhx", "unsigned char", "void *");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "size_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "ptrdiff_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "unsigned ptrdiff_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "intmax_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "uintmax_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "std::size_t", "unsigned long", "unsigned long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "std::ssize_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "std::ptrdiff_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "std::intptr_t", "signed long", "signed long long");
TEST_SCANF_WARN_AKA("%hhx", "unsigned char", "std::uintptr_t", "unsigned long", "unsigned long long");