ソースを参照

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();
 }