Unit Testing: Added more typedef tests

This commit is contained in:
Robert Reif 2010-10-08 16:00:21 +02:00 committed by Daniel Marjamäki
parent 02027eb750
commit 24eba7ef02
1 changed files with 18 additions and 0 deletions

View File

@ -216,6 +216,7 @@ private:
TEST_CASE(simplifyTypedef58); // ticket #1963
TEST_CASE(simplifyTypedef59); // ticket #2011
TEST_CASE(simplifyTypedef60); // ticket #2035
TEST_CASE(simplifyTypedef61); // ticket #2074 and 2075
TEST_CASE(simplifyTypedefFunction1);
TEST_CASE(simplifyTypedefFunction2); // ticket #1685
@ -4451,6 +4452,23 @@ private:
ASSERT_EQUALS("", errout.str());
}
void simplifyTypedef61() // ticket #2074 and 2075
{
const char code1[] = "typedef unsigned char (*Mf_GetIndexByte_Func) (void);\n"
"typedef const unsigned char * (*Mf_GetPointerToCurrentPos_Func)(void);\n";
// Check for output..
checkSimplifyTypedef(code1);
ASSERT_EQUALS("", errout.str());
const char code2[] = "typedef unsigned long uint32_t;\n"
"typedef uint32_t (*write_type_t) (uint32_t);\n";
// Check for output..
checkSimplifyTypedef(code2);
ASSERT_EQUALS("", errout.str());
}
void simplifyTypedefFunction1()
{
{