Ver código fonte

Add a test for the ctkDateRangeWidget

The test is very simple now - just instantiates the class
Steve Pieper 14 anos atrás
pai
commit
e0993b76c3

+ 3 - 1
Libs/Widgets/Testing/Cpp/CMakeLists.txt

@@ -20,6 +20,7 @@ CREATE_TEST_SOURCELIST(Tests ${KIT}CppTests.cxx
   ctkMatrixWidgetTest1.cpp
   ctkRangeSliderTest1.cpp
   ctkRangeWidgetTest1.cpp
+  ctkDateRangeWidgetTest1.cpp
   ctkSliderWidgetTest1.cpp
   ctkTreeComboBoxTest1.cpp
   ctkWorkflowWidgetTest1.cpp
@@ -81,9 +82,10 @@ SIMPLE_TEST( ctkFittedTextBrowserTest1 )
 SIMPLE_TEST( ctkMatrixWidgetTest1 )
 SIMPLE_TEST( ctkRangeSliderTest1 )
 SIMPLE_TEST( ctkRangeWidgetTest1 )
+SIMPLE_TEST( ctkDateRangeWidgetTest1 )
 SIMPLE_TEST( ctkSliderWidgetTest1 )
 SIMPLE_TEST( ctkTreeComboBoxTest1 )
 SIMPLE_TEST( ctkWorkflowWidgetTest1 )
 SIMPLE_TEST( ctkWorkflowWidgetTest2 )
 SIMPLE_TEST( ctkExampleUseOfWorkflowWidgetUsingDerivedSteps )
-SIMPLE_TEST( ctkExampleUseOfWorkflowWidgetUsingSignalsAndSlots )
+SIMPLE_TEST( ctkExampleUseOfWorkflowWidgetUsingSignalsAndSlots )

+ 42 - 0
Libs/Widgets/Testing/Cpp/ctkDateRangeWidgetTest1.cpp

@@ -0,0 +1,42 @@
+/*=========================================================================
+
+  Library:   CTK
+ 
+  Copyright (c) 2010  Kitware Inc.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.commontk.org/LICENSE
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ 
+=========================================================================*/
+
+// Qt includes
+#include <QApplication>
+
+// CTK includes
+#include "ctkDateRangeWidget.h"
+
+// STD includes
+#include <cstdlib>
+#include <iostream>
+
+//-----------------------------------------------------------------------------
+int ctkDateRangeWidgetTest1(int argc, char * argv [] )
+{
+  QApplication app(argc, argv);
+
+  ctkDateRangeWidget dateRange;
+
+
+  dateRange.show();
+  return EXIT_SUCCESS;
+}
+