Added unit test for #4619

This commit is contained in:
PKEuS 2013-03-01 04:06:51 -08:00
parent bf9aa102f2
commit 75799446aa
1 changed files with 7 additions and 0 deletions

View File

@ -453,6 +453,7 @@ private:
TEST_CASE(simplifyOperatorName4);
TEST_CASE(simplifyOperatorName5);
TEST_CASE(simplifyOperatorName6); // ticket #3194
TEST_CASE(simplifyOperatorName7); // ticket #4619
TEST_CASE(simplifyNull);
@ -7272,6 +7273,12 @@ private:
ASSERT_EQUALS(result2, tokenizeAndStringify(code2,false));
}
void simplifyOperatorName7() { // ticket #4619
const char code1[] = "value_type * operator += (int);";
const char result1[] = "value_type * operator+= ( int ) ;";
ASSERT_EQUALS(result1, tokenizeAndStringify(code1,false));
}
void simplifyNull() {
ASSERT_EQUALS("if ( ! p )", tokenizeAndStringify("if (p==NULL)"));
ASSERT_EQUALS("f ( NULL ) ;", tokenizeAndStringify("f(NULL);"));