GUITESTS: Fix XML V1 test.
Test was using and assuming that severity string starts with capital letter (e.g. "Style"). But the strings are all lowercase letters. Ticket #2832 (GUI: XML version 1 test fails)
This commit is contained in:
parent
8cff768d99
commit
ebd5a123ce
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<results>
|
<results>
|
||||||
<error file="test.cxx" line="11" id="unreadVariable" severity="Style" msg="Variable &#039;a&#039; is assigned a value that is never used"/>
|
<error file="test.cxx" line="11" id="unreadVariable" severity="style" msg="Variable &#039;a&#039; is assigned a value that is never used"/>
|
||||||
<error file="test.cxx" line="28" id="unreadVariable" severity="Style" msg="Variable &#039;b&#039; is assigned a value that is never used"/>
|
<error file="test.cxx" line="28" id="unreadVariable" severity="style" msg="Variable &#039;b&#039; is assigned a value that is never used"/>
|
||||||
<error file="test.cxx" line="31" id="memleak" severity="Error" msg="Memory leak: b"/>
|
<error file="test.cxx" line="31" id="memleak" severity="error" msg="Memory leak: b"/>
|
||||||
<error file="test.cxx" line="16" id="mismatchAllocDealloc" severity="Error" msg="Mismatching allocation and deallocation: k"/>
|
<error file="test.cxx" line="16" id="mismatchAllocDealloc" severity="error" msg="Mismatching allocation and deallocation: k"/>
|
||||||
<error file="test.cxx" line="31" id="obsoleteFunctionsgets" severity="Style" msg="Found obsolete function &#039;gets&#039;. With gets you&#039;ll get buffer overruns if the input data too big for the buffer. It is recommended to use the function &#039;fgets&#039; instead."/>
|
<error file="test.cxx" line="31" id="obsoleteFunctionsgets" severity="style" msg="Found obsolete function &#039;gets&#039;. With gets you&#039;ll get buffer overruns if the input data too big for the buffer. It is recommended to use the function &#039;fgets&#039; instead."/>
|
||||||
<error file="test.cxx" line="22" id="postfixOperator" severity="performance" msg="Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."/>
|
<error file="test.cxx" line="22" id="postfixOperator" severity="performance" msg="Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."/>
|
||||||
</results>
|
</results>
|
||||||
|
|
|
@ -35,7 +35,7 @@ void TestXmlReportV1::readXml()
|
||||||
QCOMPARE(item.file, QString("test.cxx"));
|
QCOMPARE(item.file, QString("test.cxx"));
|
||||||
QCOMPARE(item.lines[0], (unsigned int)11);
|
QCOMPARE(item.lines[0], (unsigned int)11);
|
||||||
QCOMPARE(item.id, QString("unreadVariable"));
|
QCOMPARE(item.id, QString("unreadVariable"));
|
||||||
QCOMPARE(GuiSeverity::toString(item.severity), QString("Style"));
|
QCOMPARE(GuiSeverity::toString(item.severity), QString("style"));
|
||||||
QCOMPARE(item.summary, QString("Variable 'a' is assigned a value that is never used"));
|
QCOMPARE(item.summary, QString("Variable 'a' is assigned a value that is never used"));
|
||||||
QCOMPARE(item.message, QString("Variable 'a' is assigned a value that is never used"));
|
QCOMPARE(item.message, QString("Variable 'a' is assigned a value that is never used"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue