Remove tests for API that never made it into Qt.
authorJason McDonald <jason.mcdonald@nokia.com>
Mon, 31 Oct 2011 03:09:08 +0000 (13:09 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 31 Oct 2011 05:59:24 +0000 (06:59 +0100)
Change-Id: If78d82abfb4ff3402eb8f36729bacc3c4d343d0c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
tests/auto/corelib/tools/qhash/tst_qhash.cpp
tests/auto/corelib/tools/qmap/tst_qmap.cpp
tests/auto/integrationtests/collections/tst_collections.cpp

index fc66962..2771711 100644 (file)
@@ -935,32 +935,6 @@ void tst_QHash::iterators()
         QVERIFY(javaIt.value() == testMap.value(i));
     }
 
-    /*
-        I've removed findNextKey() and findPreviousKey() from the API
-        for Qt 4.0 beta 1.
-    */
-
-#if 0
-    //findPreviousKey()  findNextKey()
-    for(i = 1; i < 100; ++i) {
-        if(javaIt.findNextKey(i))
-            QVERIFY(javaIt.value() == testString.arg(i));
-        else {
-            QVERIFY(!javaIt.hasNext());
-            QVERIFY(javaIt.findPreviousKey(i));
-            QVERIFY(javaIt.value() == testString.arg(i));
-        }
-
-        if(javaIt.findPreviousKey(i))
-            QVERIFY(javaIt.value() == testString.arg(i));
-        else {
-            QVERIFY(!javaIt.hasPrevious());
-            QVERIFY(javaIt.findNextKey(i));
-            QVERIFY(javaIt.value() == testString.arg(i));
-        }
-    }
-#endif
-
     //peekNext()  peekPrevious()
     javaIt.toFront();
     javaIt.next();
index 2b4cbe9..e6e8466 100644 (file)
@@ -713,31 +713,12 @@ void tst_QMap::iterators()
         QVERIFY(javaIt.value() == testString.arg(i));
     }
 
-    /*
-        I've removed findNextKey() and findPreviousKey() from the API
-        for Qt 4.0 beta 1.
-    */
-
-#if 0
-    QVERIFY(javaIt.findNextKey(50));
-    QVERIFY(javaIt.value() == "Teststring 50");
-#endif
-
     i = 51;
     while(javaIt.hasPrevious()) {
         --i;
         javaIt.previous();
         QVERIFY(javaIt.value() == testString.arg(i));
     }
-
-#if 0
-    QVERIFY(javaIt.findNextKey(50));
-    QVERIFY(javaIt.value() == "Teststring 50");
-
-    QVERIFY(javaIt.hasPrevious());
-    QVERIFY(javaIt.findPreviousKey(20));
-    QCOMPARE(javaIt.value(), QString("Teststring 20"));
-#endif
 }
 
 void tst_QMap::keys_values_uniqueKeys()
index f09ff06..a490194 100644 (file)
@@ -1631,65 +1631,6 @@ void tst_Collections::hash()
         QCOMPARE(hash2.size(), 10);
         QCOMPARE(hash2.values(), hash1.values() + hash1.values());
     }
-
-#if 0
-    {
-        QMultiHash<QString, int> hash1;
-        hash1.insert("1", 2);
-        hash1.insert("1", 1);
-        hash1.insert("a", 3);
-        hash1.insert("a", 2);
-        hash1.insert("a", 1);
-        hash1.insert("b", 2);
-        hash1.insert("b", 1);
-
-        // hash1: [ "1" -> 1, "1" -> 2, "a" -> 1, "a" -> 2, "a" -> 3, "b" -> 1, "b" -> 2 ]
-
-        QHashIterator<QString, int> i1(hash1);
-        i1.toBack();
-
-        bool found;
-
-        found = i1.findPreviousKey("1");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findPreviousKey("1");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findPreviousKey("1");
-        QVERIFY(!found);
-
-        i1.toFront();
-        found = i1.findNextKey("1");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findNextKey("1");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findNextKey("1");
-        QVERIFY(!found);
-
-        i1.toBack();
-        found = i1.findPreviousKey("b");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findPreviousKey("b");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findPreviousKey("b");
-        QVERIFY(!found);
-
-        i1.toFront();
-        found = i1.findNextKey("b");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findNextKey("b");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findNextKey("b");
-        QVERIFY(!found);
-    }
-#endif
 }
 
 void tst_Collections::map()
@@ -1928,53 +1869,6 @@ void tst_Collections::map()
         map1.insert("b", 2);
         map1.insert("b", 1);
 
-       // map1: [ "1" -> 1, "1" -> 2, "a" -> 1, "a" -> 2, "a" -> 3, "b" -> 1, "b" -> 2 ]
-
-#if 0
-        QMapIterator<QString, int> i1(map1);
-        i1.toBack();
-
-        bool found;
-        found = i1.findPreviousKey("1");
-       QVERIFY(found && i1.value() == 2);
-
-        found = i1.findPreviousKey("1");
-       QVERIFY(found && i1.value() == 1);
-
-        found = i1.findPreviousKey("1");
-        QVERIFY(!found);
-
-       i1.toFront();
-        found = i1.findNextKey("1");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findNextKey("1");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findNextKey("1");
-        QVERIFY(!found);
-
-       i1.toBack();
-        found = i1.findPreviousKey("b");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findPreviousKey("b");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findPreviousKey("b");
-        QVERIFY(!found);
-
-       i1.toFront();
-        found = i1.findNextKey("b");
-        QVERIFY(found && i1.value() == 1);
-
-        found = i1.findNextKey("b");
-        QVERIFY(found && i1.value() == 2);
-
-        found = i1.findNextKey("b");
-        QVERIFY(!found);
-#endif
-
         QMultiMap<QString, int>::iterator j1, k1;
 
         j1 = map1.lowerBound("0"); k1 = map1.upperBound("0");