Changed qdir unittest remove() to check actual file removed
authorKurt Korbatits <kurt.korbatits@nokia.com>
Thu, 1 Mar 2012 02:57:37 +0000 (12:57 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Mar 2012 04:43:17 +0000 (05:43 +0100)
- Changed remove() test to check the file just removed is gone.

Change-Id: I0b6c176e624134402b5547866064f436ce063f16
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/corelib/io/qdir/tst_qdir.cpp

index ca01a1e..b7fc366 100644 (file)
@@ -1214,7 +1214,8 @@ void tst_QDir::remove()
     f.close();
     QDir dir;
     QVERIFY(dir.remove("remove-test"));
-    QVERIFY(!dir.remove("/remove-test"));
+    // Test that the file just removed is gone
+    QVERIFY(!dir.remove("remove-test"));
     QTest::ignoreMessage(QtWarningMsg, "QDir::remove: Empty or null file name");
     QVERIFY(!dir.remove(""));
 }