瀏覽代碼

Cleanup ctkColorDialogTest1 and ctkColorDialogTest2

Closes #210
Julien Finet 12 年之前
父節點
當前提交
b843ce6b62
共有 2 個文件被更改,包括 6 次插入8 次删除
  1. 0 5
      Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp
  2. 6 3
      Libs/Widgets/Testing/Cpp/ctkColorDialogTest2.cpp

+ 0 - 5
Libs/Widgets/Testing/Cpp/ctkColorDialogTest1.cpp

@@ -93,9 +93,4 @@ int ctkColorDialogTest1(int argc, char * argv [] )
     }
 
   return app.exec();
-
-  ctkColorDialog::addDefaultTab(extraPanel, "Extra");
-  QColor color = ctkColorDialog::getColor(Qt::black,0 , "", 0);
-  return EXIT_SUCCESS;
-
 }

+ 6 - 3
Libs/Widgets/Testing/Cpp/ctkColorDialogTest2.cpp

@@ -46,9 +46,12 @@ int ctkColorDialogTest2(int argc, char * argv [] )
     QTimer::singleShot(300, &app, SLOT(quit()));
     }
 
-  // The opened dialog blocks QTimers which prevents the test
-  // from being quit.
   QColor color = ctkColorDialog::getColor(Qt::black,0 , "", QColorDialog::DontUseNativeDialog);
-  
+  if (color.isValid())
+    {
+    std::cout << "The color dialog should have been quit without a valid color."
+              << std::endl;
+    return EXIT_FAILURE;
+    }
   return app.exec();
 }