]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add complete set of tests.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 26 Feb 2010 06:00:53 +0000 (06:00 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 26 Feb 2010 06:00:53 +0000 (06:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@20703 0785d39b-7218-0410-832d-ea1e28bc413d

tests/a-framework/Makefile
tests/a-framework/compile.cc
tests/a-framework/fail.cc [new file with mode: 0644]
tests/a-framework/fail/cmp/generic [new file with mode: 0644]
tests/a-framework/link.cc [new file with mode: 0644]
tests/a-framework/link/cmp/generic [new file with mode: 0644]
tests/a-framework/miscompare.cc

index b54ccd4a710b42e5fb5e7191c46dd1fdc4fd0a25..e1317c8d3e321a83f7e609ba96d9047cabe86ff9 100644 (file)
@@ -21,7 +21,7 @@ default: run-tests
 
 ############################################################
 
-tests_x = run compile link fail
+tests_x = run miscompare compile link fail
 
 # from above list of regular expressions, generate the real set of
 # tests
index ab1e65162c1d239470b00a57c686e3e917f89ae5..d5ffde8c14911dac33efba86092390a19408e4fa 100644 (file)
 //----------------------------  timer.cc  ---------------------------
 
 
-// test the testsuite framework. this test is supposed to compile successfully
-// but not run
+// test the testsuite framework. this test is supposed to compile
+// successfully but not link
 
 #include "../tests.h"
 #include <base/logstream.h>
 #include <fstream>
 #include <cstdlib>
 
+void function_that_does_not_exist ();
+
 
 int main ()
 {
@@ -27,7 +29,7 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console(0);
 
-  std::abort ();
+  function_that_does_not_exist ();
   
   deallog << "OK" << std::endl;
 }
diff --git a/tests/a-framework/fail.cc b/tests/a-framework/fail.cc
new file mode 100644 (file)
index 0000000..33aa1f0
--- /dev/null
@@ -0,0 +1,34 @@
+//----------------------------  timer.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2010by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  timer.cc  ---------------------------
+
+
+// test the testsuite framework. this test is supposed to compile and link
+// successfully but not run
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <fstream>
+#include <cstdlib>
+
+
+int main ()
+{
+  std::ofstream logfile("fail/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  compile error;
+  
+  deallog << "OK" << std::endl;
+}
+
diff --git a/tests/a-framework/fail/cmp/generic b/tests/a-framework/fail/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
diff --git a/tests/a-framework/link.cc b/tests/a-framework/link.cc
new file mode 100644 (file)
index 0000000..cdabfa9
--- /dev/null
@@ -0,0 +1,34 @@
+//----------------------------  timer.cc  ---------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2010by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  timer.cc  ---------------------------
+
+
+// test the testsuite framework. this test is supposed to compile and link
+// successfully but not run
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <fstream>
+#include <cstdlib>
+
+
+int main ()
+{
+  std::ofstream logfile("link/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  std::abort ();
+  
+  deallog << "OK" << std::endl;
+}
+
diff --git a/tests/a-framework/link/cmp/generic b/tests/a-framework/link/cmp/generic
new file mode 100644 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK
index 475dab43852c62feb41a3022ca9c123d86fe6480..183ea6773f7e4521c97a506e21eaa66b11a361bc 100644 (file)
@@ -27,8 +27,6 @@ int main ()
   deallog.attach(logfile);
   deallog.depth_console(0);
 
-  std::abort ();
-  
   deallog << "FAIL!" << std::endl;
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.