Give more informative error in wxFSW test.
Output more details when more than one event is unexpectedly received. Hopefully this will allow to debug the test failure at build bot slaves which doesn't seem to be happening locally. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d5236dfffd
commit
1c9c8e88c2
@ -327,7 +327,18 @@ public:
|
||||
|
||||
virtual bool CheckResult()
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL( 1, m_events.size() );
|
||||
CPPUNIT_ASSERT_MESSAGE( "No events received", !m_events.empty() );
|
||||
|
||||
WX_ASSERT_EQUAL_MESSAGE
|
||||
(
|
||||
(
|
||||
"Extra event received, last has type=%x, path=\"%s\"",
|
||||
m_events.back()->GetChangeType(),
|
||||
m_events.back()->GetPath().GetFullPath()
|
||||
),
|
||||
1, m_events.size()
|
||||
);
|
||||
|
||||
const wxFileSystemWatcherEvent * const e = m_events.front();
|
||||
|
||||
// this is our "reference event"
|
||||
@ -342,7 +353,6 @@ public:
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(expected.GetPath(), e->GetPath());
|
||||
CPPUNIT_ASSERT_EQUAL(expected.GetNewPath(), e->GetNewPath());
|
||||
CPPUNIT_ASSERT_EQUAL(expected.GetChangeType(), e->GetChangeType());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user