26c41ed918
Previously, ignored messages were only cleared at the end of each test function, i.e. after all data rows were finished. This meant that if a data row in a data-driven test function didn't cause all of the expected messages to be generated, the remaining messages would be carried over to the next data row. This would result in errors about missing messages being associated with the last data row rather than with the correct data row. This commit makes testlib check for missing ignored messages after running each data row rather than only doing so after the last data row. This commit also adds a regression test to demonstrate that ignored messages can no longer be carried over from one data row to another. Change-Id: Ibee51aa6e96866fbcbcb4acee1a8340a86a6a4ba Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
69 lines
2.5 KiB
Plaintext
69 lines
2.5 KiB
Plaintext
<Environment>
|
|
<QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
|
|
<QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
|
|
</Environment>
|
|
<TestFunction name="initTestCase">
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|
|
<TestFunction name="testWarnings">
|
|
<Message type="qwarn" file="" line="0">
|
|
<Description><![CDATA[Warning]]></Description>
|
|
</Message>
|
|
<Message type="qwarn" file="" line="0">
|
|
<Description><![CDATA[Warning]]></Description>
|
|
</Message>
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[Debug]]></Description>
|
|
</Message>
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[Debug]]></Description>
|
|
</Message>
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[Baba]]></Description>
|
|
</Message>
|
|
<Message type="qdebug" file="" line="0">
|
|
<Description><![CDATA[Baba]]></Description>
|
|
</Message>
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|
|
<TestFunction name="testMissingWarnings">
|
|
<Message type="info" file="" line="0">
|
|
<Description><![CDATA[Did not receive message: "Warning0"]]></Description>
|
|
</Message>
|
|
<Message type="info" file="" line="0">
|
|
<Description><![CDATA[Did not receive message: "Warning1"]]></Description>
|
|
</Message>
|
|
<Incident type="fail" file="" line="0">
|
|
<Description><![CDATA[Not all expected messages were received]]></Description>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="testMissingWarningsWithData">
|
|
<Message type="info" file="" line="0">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
<Description><![CDATA[Did not receive message: "Warning0"]]></Description>
|
|
</Message>
|
|
<Message type="info" file="" line="0">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
<Description><![CDATA[Did not receive message: "Warning1"]]></Description>
|
|
</Message>
|
|
<Incident type="fail" file="" line="0">
|
|
<DataTag><![CDATA[first row]]></DataTag>
|
|
<Description><![CDATA[Not all expected messages were received]]></Description>
|
|
</Incident>
|
|
<Message type="info" file="" line="0">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
<Description><![CDATA[Did not receive message: "Warning0"]]></Description>
|
|
</Message>
|
|
<Message type="info" file="" line="0">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
<Description><![CDATA[Did not receive message: "Warning1"]]></Description>
|
|
</Message>
|
|
<Incident type="fail" file="" line="0">
|
|
<DataTag><![CDATA[second row]]></DataTag>
|
|
<Description><![CDATA[Not all expected messages were received]]></Description>
|
|
</Incident>
|
|
</TestFunction>
|
|
<TestFunction name="cleanupTestCase">
|
|
<Incident type="pass" file="" line="0" />
|
|
</TestFunction>
|