test std.cfg: Added better test cases for toupper() and tolower().

This commit is contained in:
orbitcowboy 2019-11-14 08:31:00 +01:00
parent f88ae21d8f
commit 20e2c513b6
1 changed files with 27 additions and 5 deletions

View File

@ -3485,18 +3485,40 @@ void uninitvar_tmpnam(void)
(void)tmpnam(s);
}
void uninitvar_tolower(void)
void uninitvar_tolower(int character)
{
int c;
// cppcheck-suppress uninitvar
(void)tolower(c);
int *pc=&c;
// cppcheck-suppress uninitvar
(void)tolower(*pc);
// No warning is expected
(void)tolower(character);
int *pChar = &character;
// No warning is expected
(void)tolower(*pChar);
}
void uninitvar_toupper(void)
void uninitvar_toupper(int character)
{
int c;
// cppcheck-suppress uninitvar
(void)toupper(c);
int *pc=&c;
// cppcheck-suppress uninitvar
(void)toupper(*pc);
// No warning is expected
(void)toupper(character);
int *pChar = &character;
// No warning is expected
(void)toupper(*pChar);
}
void uninitvar_wcstof(void)