Convert wrong test result for #7133 to TODO_ASSERT_EQUALS and add more test cases

This commit is contained in:
Alexander Mai 2015-11-15 20:14:20 +01:00
parent 71bf0f076f
commit 435a980ce2
1 changed files with 23 additions and 1 deletions

View File

@ -5641,7 +5641,29 @@ private:
" catch (const uno::Exception&) {\n" " catch (const uno::Exception&) {\n"
" }\n" " }\n"
"}", "test.cpp", false, true); "}", "test.cpp", false, true);
ASSERT_EQUALS("[test.cpp:6] -> [test.cpp:9]: (performance) Variable 'Name' is reassigned a value before the old one has been used.\n", errout.str()); TODO_ASSERT_EQUALS("",
"[test.cpp:6] -> [test.cpp:9]: (performance) Variable 'Name' is reassigned a value before the old one has been used.\n",
errout.str());
check("void ConvertBitmapData(sal_uInt16 nDestBits) {\n"
"BitmapBuffer aSrcBuf;\n"
" aSrcBuf.mnBitCount = nSrcBits;\n"
" BitmapBuffer aDstBuf;\n"
" aSrcBuf.mnBitCount = nDestBits;\n"
" bConverted = ::ImplFastBitmapConversion( aDstBuf, aSrcBuf, aTwoRects );\n"
"}", "test.c");
ASSERT_EQUALS("[test.c:3] -> [test.c:5]: (performance) Variable 'mnBitCount' is reassigned a value before the old one has been used.\n", errout.str());
check("void ConvertBitmapData(sal_uInt16 nDestBits) {\n"
"BitmapBuffer aSrcBuf;\n"
" aSrcBuf.mnBitCount = nSrcBits;\n"
" BitmapBuffer aDstBuf;\n"
" aSrcBuf.mnBitCount = nDestBits;\n"
" bConverted = ::ImplFastBitmapConversion( aDstBuf, aSrcBuf, aTwoRects );\n"
"}");
TODO_ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:5]: (performance, inconclusive) Variable 'mnBitCount' is reassigned a value before the old one has been used.\n",
"[test.cpp:3] -> [test.cpp:5]: (performance) Variable 'mnBitCount' is reassigned a value before the old one has been used.\n",
errout.str());
} }
void redundantMemWrite() { void redundantMemWrite() {