Skip to content

Commit fcaaf1d

Browse files
committed
add test
1 parent a5ec929 commit fcaaf1d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testother.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class TestOther : public TestFixture {
195195
TEST_CASE(duplicateExpression16); // #10569
196196
TEST_CASE(duplicateExpression17); // #12036
197197
TEST_CASE(duplicateExpression18);
198+
TEST_CASE(duplicateExpression19);
198199
TEST_CASE(duplicateExpressionLoop);
199200
TEST_CASE(duplicateValueTernary);
200201
TEST_CASE(duplicateValueTernarySizeof); // #13773
@@ -7988,6 +7989,14 @@ class TestOther : public TestFixture {
79887989
ASSERT_EQUALS("", errout_str());
79897990
}
79907991

7992+
void duplicateExpression19() {
7993+
checkP("const int i = 0;\n"
7994+
"void f() {\n"
7995+
" assert(i == 0);\n"
7996+
"}\n");
7997+
ASSERT_EQUALS("", errout_str());
7998+
}
7999+
79918000
void duplicateExpressionLoop() {
79928001
check("void f() {\n"
79938002
" int a = 1;\n"

0 commit comments

Comments
 (0)