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
virtual bool CheckResult()
{
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"
const wxFileSystemWatcherEvent * const e = m_events.front();
// this is our "reference event"
CPPUNIT_ASSERT_EQUAL(expected.GetPath(), e->GetPath());
CPPUNIT_ASSERT_EQUAL(expected.GetNewPath(), e->GetNewPath());
CPPUNIT_ASSERT_EQUAL(expected.GetPath(), e->GetPath());
CPPUNIT_ASSERT_EQUAL(expected.GetNewPath(), e->GetNewPath());
- CPPUNIT_ASSERT_EQUAL(expected.GetChangeType(), e->GetChangeType());