Parcourir la source

ENH: add test for set to create source lists

Bill Hoffman il y a 24 ans
Parent
commit
0223ba91f3

+ 4 - 1
Tests/TestDriver/CMakeLists.txt

@@ -1,10 +1,13 @@
 PROJECT(TestDriverTest)
 
+SET(Extra_SRCS testExtraStuff.cxx testExtraStuff2.cxx )
+SET(Extra_SRCS ${Extra_SRCS};testExtraStuff3.cxx )
+
 CREATE_TEST_SOURCELIST(testSrcs 
                        TestDriverTest 
                        test1 
                        test2 
 	               subdir/test3)
 
-ADD_EXECUTABLE(TestDriverTest testSrcs)
+ADD_EXECUTABLE(TestDriverTest testSrcs ${Extra_SRCS})
 

+ 17 - 0
Tests/TestDriver/test1.cxx

@@ -1,6 +1,23 @@
 #include <stdio.h>
+int testExtraStuff3();
+int testExtraStuff();
+int testExtraStuff2();
+
 int test1(int ac, char** av)
 {
+  if(!testExtraStuff2())
+    {
+    return -1;
+    }
+  if(!testExtraStuff())
+    {
+    return -1;
+    }
+  if(!testExtraStuff3())
+    {
+    return -1;
+    }
+  
   printf("test1\n");
   for(int i =0; i < ac; i++)
     printf("arg %d is %s\n", ac, av[i]);

+ 4 - 0
Tests/TestDriver/testExtraStuff.cxx

@@ -0,0 +1,4 @@
+int testExtraStuff()
+{
+  return 1;
+}

+ 4 - 0
Tests/TestDriver/testExtraStuff2.cxx

@@ -0,0 +1,4 @@
+int testExtraStuff2()
+{
+  return 1;
+}

+ 4 - 0
Tests/TestDriver/testExtraStuff3.cxx

@@ -0,0 +1,4 @@
+int testExtraStuff3()
+{
+  return 1;
+}