Add regression test for 8168 (#1588)

Ticket 8168 was fixed in 713f607168.
Add a regression test to make sure the bug doesn't reappear.
This commit is contained in:
rikardfalkeborn 2019-01-11 14:11:48 +01:00 committed by amai2012
parent 991191450a
commit 49bad106bb
1 changed files with 12 additions and 0 deletions

View File

@ -673,6 +673,18 @@ private:
" else if( !!(b) && !!(a+b)){}\n"
"}\n");
ASSERT_EQUALS("", errout.str());
// #8168
check("enum MaskValues\n"
"{\n"
" Value1 = 0x00000001,\n"
" Value2 = 0x00000002\n"
"};\n"
"void TestFunction(int value) {\n"
" if ( value & (int)Value1 ) {}\n"
" else if ( value & (int)Value2 ) {}\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}
void checkBadBitmaskCheck() {