From 75799446aacd41b0990b7288bd54a8deb3a1b992 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Fri, 1 Mar 2013 04:06:51 -0800 Subject: [PATCH] Added unit test for #4619 --- test/testtokenize.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index a15e74321..066e0e0da 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -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);"));