From 5b6799dffbd8ffc0c5943bf7dc35c945db0ae5ec Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 25 Sep 2009 12:48:21 +0100 Subject: tst_qfilesystemwatcher directory changed test relaxed The polling watcher was generating two events for directory content deletion on Symbian emulator. 1 for content change, 1 for time change. Seems within the bounds of reason for a poller, so test relaxed to allow it. Reviewed-by: Liang QI --- tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 32cbed3..88bf229 100644 --- a/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -515,7 +515,9 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory() timer.start(3000); eventLoop.exec(); QCOMPARE(fileChangedSpy.count(), 0); - QCOMPARE(dirChangedSpy.count(), 1); + // polling watcher has generated separate events for content and time change + // on Symbian emulator, so allow possibility of 2 events + QVERIFY(dirChangedSpy.count() == 1 || dirChangedSpy.count() == 2); QVERIFY(QDir().rmdir("testDir")); } -- cgit v0.12