Skip to content

Commit ceb07fb

Browse files
Update testassert.cpp
1 parent b226506 commit ceb07fb

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/testassert.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,17 @@ class TestAssert : public TestFixture {
147147
" assert(g());\n"
148148
"}\n");
149149
ASSERT_EQUALS("", errout_str());
150+
151+
check("int i;\n" // #14973
152+
"bool f() {\n"
153+
" i = 0;\n"
154+
" return true;\n"
155+
"}\n"
156+
"void g() {\n"
157+
" bool (*fp)() = f;\n"
158+
" assert(fp == f);\n"
159+
"}\n");
160+
ASSERT_EQUALS("", errout_str());
150161
}
151162

152163
void memberFunctionCallInAssert() {

0 commit comments

Comments
 (0)