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:
parent
991191450a
commit
49bad106bb
|
@ -673,6 +673,18 @@ private:
|
||||||
" else if( !!(b) && !!(a+b)){}\n"
|
" else if( !!(b) && !!(a+b)){}\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
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() {
|
void checkBadBitmaskCheck() {
|
||||||
|
|
Loading…
Reference in New Issue