Explorar el Código

Fix ctkAbstractLibraryFactoryTest1 and ctkAbstractPluginFactoryTest1. #27

Jean-Christophe Fillion-Robin hace 13 años
padre
commit
783a35bf6f

+ 3 - 6
Libs/Core/Testing/Cpp/CMakeLists.txt

@@ -117,15 +117,12 @@ ENDMACRO( SIMPLE_TEST  )
 #
 
 SIMPLE_TEST( ctkAbstractFactoryTest1 )
-ADD_TEST( ctkAbstractLibraryFactoryTest1 ${KIT_TESTS} ctkAbstractLibraryFactoryTest1 ${ctkDummyPluginPATH})
-SET_PROPERTY(TEST ctkAbstractLibraryFactoryTest1 PROPERTY LABELS ${PROJECT_NAME})
+SIMPLE_TEST( ctkAbstractLibraryFactoryTest1 ${ctkDummyPluginPATH} )
 SIMPLE_TEST( ctkAbstractObjectFactoryTest1 )
-ADD_TEST( ctkAbstractPluginFactoryTest1 ${KIT_TESTS} ctkAbstractPluginFactoryTest1 ${ctkDummyPluginPATH})
-SET_PROPERTY(TEST ctkAbstractPluginFactoryTest1 PROPERTY LABELS ${PROJECT_NAME})
+SIMPLE_TEST( ctkAbstractPluginFactoryTest1 ${ctkDummyPluginPATH} )
 SIMPLE_TEST( ctkAbstractQObjectFactoryTest1 )
 IF(HAVE_BFD)
-  ADD_TEST(NAME ctkBinaryFileDescriptorTest1 COMMAND ${KIT_TESTS} ctkBinaryFileDescriptorTest1 $<TARGET_FILE:ctkBinaryFileDescriptorTestHelper>)
-  SET_PROPERTY(TEST ctkBinaryFileDescriptorTest1 PROPERTY LABELS ${PROJECT_NAME})
+  SIMPLE_TEST( ctkBinaryFileDescriptorTest1 $<TARGET_FILE:ctkBinaryFileDescriptorTestHelper> )
 ENDIF()
 SIMPLE_TEST( ctkCallbackTest1 )
 SIMPLE_TEST( ctkCheckableModelHelperTest1 )

+ 4 - 1
Libs/Core/Testing/Cpp/ctkAbstractLibraryFactoryTest1.cpp

@@ -29,10 +29,12 @@
 #include <cstdlib>
 #include <iostream>
 
+//-----------------------------------------------------------------------------
 class ctkDummyLibrary
 {
 };
 
+//-----------------------------------------------------------------------------
 class ctkDummyLibraryItem: public ctkFactoryLibraryItem<ctkDummyLibrary>
 {
 protected:
@@ -52,6 +54,7 @@ protected:
   }
 };
 
+//-----------------------------------------------------------------------------
 class ctkDummyLibraryFactoryItem: public ctkAbstractLibraryFactory<ctkDummyLibrary>
 {
 protected:
@@ -102,7 +105,7 @@ int ctkAbstractLibraryFactoryTest1(int argc, char * argv [])
               << std::endl;
     return EXIT_FAILURE;
     }
-  
+
   res = libraryFactory.registerFileItem("lib", file);
   if (!res || libraryFactory.itemKeys().count() != 1)
     {