Skip to content

Commit 560d7ee

Browse files
committed
Added test removeParantheses29 in order to test ticket #13735
1 parent 7497ccb commit 560d7ee

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test/testtokenize.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ class TestTokenizer : public TestFixture {
184184
TEST_CASE(removeParentheses26); // Ticket #8875 a[0](0)
185185
TEST_CASE(removeParentheses27);
186186
TEST_CASE(removeParentheses28); // #12164 - don't remove parentheses in '(expr1) ? (expr2) : (expr3);'
187+
TEST_CASE(removeParantheses29); // #13735
187188

188189
TEST_CASE(tokenize_double);
189190
TEST_CASE(tokenize_strings);
@@ -2179,6 +2180,18 @@ class TestTokenizer : public TestFixture {
21792180
ASSERT_EQUALS(exp, tokenizeAndStringify(code));
21802181
}
21812182

2183+
void removeParantheses29() { // Ticket #13735
2184+
static char code[] = "double foo(void)\n"
2185+
"{\n"
2186+
"return (modf)(12.3, NULL);\n"
2187+
"}";
2188+
static const char exp[] = "double foo ( )\n"
2189+
"{\n"
2190+
"return modf ( 12.3 , NULL ) ;\n"
2191+
"}";
2192+
ASSERT_EQUALS(exp, tokenizeAndStringify(code));
2193+
}
2194+
21822195
void tokenize_double() {
21832196
const char code[] = "void f() {\n"
21842197
" double a = 4.2;\n"

0 commit comments

Comments
 (0)