TestTokenizer : Broke up TestTokenizer::ifAddBraces into a few separate tests

This commit is contained in:
Daniel Marjamäki 2008-12-22 18:05:22 +00:00
parent 30c86f7107
commit 7a3fd268e1
1 changed files with 49 additions and 47 deletions

View File

@ -46,7 +46,9 @@ private:
TEST_CASE( const_and_volatile_functions );
TEST_CASE( ifAddBraces );
TEST_CASE( ifAddBraces1 );
TEST_CASE( ifAddBraces2 );
TEST_CASE( ifAddBraces3 );
TEST_CASE( numeric_true_condition );
@ -222,8 +224,7 @@ private:
ASSERT_EQUALS( std::string(" void f ( ) { ; }"), ostr.str() );
}
void ifAddBraces()
{
void ifAddBraces1()
{
const char code[] = "void f()\n"
"{\n"
@ -243,6 +244,7 @@ private:
ASSERT_EQUALS( std::string(" void f ( ) { if ( a ) { ; } }"), ostr.str() );
}
void ifAddBraces2()
{
const char code[] = "void f()\n"
"{\n"
@ -262,6 +264,7 @@ private:
ASSERT_EQUALS( std::string(" void f ( ) { if ( a ) { if ( b ) { } } }"), ostr.str() );
}
void ifAddBraces3()
{
const char code[] = "void f()\n"
"{\n"
@ -280,7 +283,6 @@ private:
ostr << " " << tok->str();
ASSERT_EQUALS( std::string(" void f ( ) { if ( a ) { for ( ; ; ) { } } }"), ostr.str() );
}
}
void simplify_known_variables()
{