Refactoring: Added ASSERT_EQUALS above TODO_ASSERT_EQUALS to catch changes in the behaviour better

This commit is contained in:
Daniel Marjamäki 2010-11-06 11:08:05 +01:00
parent e901ee2e68
commit 694853249f
1 changed files with 9 additions and 1 deletions

View File

@ -1096,8 +1096,16 @@ private:
" }\n" " }\n"
"}\n"; "}\n";
const std::string expected1("void f ( ) {"
" bool b ; b = false ;"
" { b = true ; }");
TODO_ASSERT_EQUALS( TODO_ASSERT_EQUALS(
"void f ( ) { bool b ; b = false ; { b = true ; } if ( true ) { a ( ) ; } }", expected1 + " if ( true ) { a ( ) ; } }",
simplifyKnownVariables(code));
ASSERT_EQUALS(
expected1 + " if ( b ) { a ( ) ; } }",
simplifyKnownVariables(code)); simplifyKnownVariables(code));
} }