[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/tests
From:       Stephen Kelly <steveire () gmail ! com>
Date:       2009-07-20 11:13:24
Message-ID: 1248088404.337256.17761.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 999678 by skelly:

Remove obsolete tests that don't do anything. Will be replaced later.

 M  +0 -260    descendantentitiesproxymodeltest.cpp  


--- trunk/KDE/kdelibs/kdeui/tests/descendantentitiesproxymodeltest.cpp #999677:999678
@@ -85,14 +85,6 @@
 private slots:
   void initTestCase();
 
-  // TODO: Split these into tests in ProxyModelTest and initTestCase
-  void testInsertionChangeAndRemoval();
-  void testSameParentUp();
-  void testSameParentDown();
-  void testDifferentParentUp();
-  void testDifferentParentDown();
-  void testDifferentParentSameLevel();
-
 private:
   KDescendantEntitiesProxyModel *m_proxyModel;
   IndexFinder m_rootIdxFinder;
@@ -261,257 +253,5 @@
 
 }
 
-
-void DescendantEntitiesProxyModelTest::testInsertionChangeAndRemoval()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  int max_runs = 2;
-  for (int i = 0; i < max_runs; i++)
-  {
-    ins = new ModelInsertCommand(model, this);
-    ins->setAncestorRowNumbers(ancestorRows);
-    ins->setStartRow(0);
-    ins->setEndRow(9);
-    ins->doCommand();
-    ancestorRows << 2;
-  }
-
-  ModelDataChangeCommand *mch;
-  mch = new ModelDataChangeCommand(model, this);
-  mch->setStartRow(0);
-  mch->setEndRow(4);
-  mch->doCommand();
-
-  // Item 0-0
-  // Item 1-0
-  // Item 2-0
-  // Item 3-0
-  // Item 4-0
-
-  // Item 0-0
-  // Item 2-0
-  // Item 3-0
-  // Item 1-0
-  // Item 4-0
-//   2, 3 -1
-//   1 2
-
-  // Item 0-0
-  // Item 3-0
-  // Item 1-0
-  // Item 2-0
-  // Item 4-0
-// 3 -2
-// 1,2 +1
-
-
-
-  ModelRemoveCommand *rem;
-  rem = new ModelRemoveCommand(model, this);
-  rem->setStartRow(2);
-  rem->setEndRow(2);
-  rem->doCommand();
-
-  // If we get this far, modeltest didn't assert.
-  QVERIFY(true);
-}
-
-void DescendantEntitiesProxyModelTest::testSameParentDown()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  int max_runs = 1;
-  for (int i = 0; i < max_runs; i++)
-  {
-    ins = new ModelInsertCommand(model, this);
-    ins->setAncestorRowNumbers(ancestorRows);
-    ins->setStartRow(0);
-    ins->setEndRow(9);
-    ins->doCommand();
-    ancestorRows << 2;
-  }
-
-  ModelMoveCommand *mmc;
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(3);
-  mmc->setEndRow(5);
-  mmc->setDestRow(8);
-  mmc->doCommand();
-
-  QVERIFY(true);
-}
-
-void DescendantEntitiesProxyModelTest::testSameParentUp()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  ins = new ModelInsertCommand(model, this);
-  ins->setAncestorRowNumbers(ancestorRows);
-  ins->setStartRow(0);
-  ins->setEndRow(9);
-  ins->doCommand();
-
-  ModelMoveCommand *mmc;
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(8);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(7);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(6);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(5);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setStartRow(4);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  QVERIFY(true);
-}
-
-void DescendantEntitiesProxyModelTest::testDifferentParentUp()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  int max_runs = 2;
-  for (int i = 0; i < max_runs; i++)
-  {
-    ins = new ModelInsertCommand(model, this);
-    ins->setAncestorRowNumbers(ancestorRows);
-    ins->setStartRow(0);
-    ins->setEndRow(9);
-    ins->doCommand();
-    ancestorRows << 2;
-  }
-
-  ancestorRows.clear();
-  ancestorRows << 2;
-
-  ModelMoveCommand *mmc;
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setDestAncestors(ancestorRows);
-  mmc->setStartRow(7);
-  mmc->setEndRow(8);
-  mmc->setDestRow(1);
-  mmc->doCommand();
-
-  QVERIFY(true);
-}
-
-void DescendantEntitiesProxyModelTest::testDifferentParentDown()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  int max_runs = 2;
-  for (int i = 0; i < max_runs; i++)
-  {
-    ins = new ModelInsertCommand(model, this);
-    ins->setAncestorRowNumbers(ancestorRows);
-    ins->setStartRow(0);
-    ins->setEndRow(9);
-    ins->doCommand();
-    ancestorRows << 2;
-  }
-
-  ancestorRows.clear();
-  ancestorRows << 2;
-
-  ModelMoveCommand *mmc;
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setDestAncestors(ancestorRows);
-  mmc->setStartRow(6);
-  mmc->setEndRow(7);
-  mmc->setDestRow(9);
-  mmc->doCommand();
-
-  QVERIFY(true);
-}
-
-void DescendantEntitiesProxyModelTest::testDifferentParentSameLevel()
-{
-  DynamicTreeModel *model = new DynamicTreeModel(this);
-
-  KDescendantEntitiesProxyModel *proxy = new KDescendantEntitiesProxyModel(this);
-  proxy->setSourceModel(model);
-
-  QList<int> ancestorRows;
-
-  ModelInsertCommand *ins;
-  int max_runs = 2;
-  for (int i = 0; i < max_runs; i++)
-  {
-    ins = new ModelInsertCommand(model, this);
-    ins->setAncestorRowNumbers(ancestorRows);
-    ins->setStartRow(0);
-    ins->setEndRow(9);
-    ins->doCommand();
-    ancestorRows << 2;
-  }
-
-  ancestorRows.clear();
-  ancestorRows << 2;
-
-  ModelMoveCommand *mmc;
-
-  mmc = new ModelMoveCommand(model, this);
-  mmc->setDestAncestors(ancestorRows);
-  mmc->setStartRow(6);
-  mmc->setEndRow(7);
-  mmc->setDestRow(6);
-  mmc->doCommand();
-
-  QVERIFY(true);
-
-}
-
 QTEST_KDEMAIN(DescendantEntitiesProxyModelTest, GUI)
 #include "kdescendantentitiesproxymodeltest.moc"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic