]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add stack backtrace functions.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 22:13:45 +0000 (22:13 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 30 Jun 2005 22:13:45 +0000 (22:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@11026 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/Makefile
tests/base/stack_trace.cc [deleted file]

index 7c51f7181a932bf4da7d5bfc913be8286954af23..6a3f99bf234eb94e132f889c630b57542263b553 100644 (file)
@@ -38,7 +38,8 @@ tests_x =  logtest \
           anisotropic_* \
            hierarchical \
           data_out_base \
-          function_parser
+          function_parser \
+          stack_trace_*
 
 # from above list of regular expressions, generate the real set of
 # tests
diff --git a/tests/base/stack_trace.cc b/tests/base/stack_trace.cc
deleted file mode 100644 (file)
index 2fb025c..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-//----------------------------  stack_trace.cc  ---------------------------
-//    $Id$
-//    Version: $Name$ 
-//
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by 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.
-//
-//----------------------------  stack_trace.cc  ---------------------------
-
-
-#include "../tests.h"
-#include <base/exceptions.h>
-#include <base/logstream.h>
-#include <base/function_lib.h>
-#include <fstream>
-
-// test the stack trace generation when hitting an Assert(...)
-
-
-void test1a ()
-{
-  int i = 0;
-  Assert (i!=0, ExcMessage ("Gotcha!"));
-}
-
-
-void test1b ()
-{
-  int i = 0;
-  AssertThrow (i!=0, ExcMessage ("Gotcha!"));
-}
-
-
-void test2 ()
-{
-
-                                  // access an invalid
-                                  // component. should trigger an
-                                  // Assert()
-  ConstantFunction<2>(1.).value (Point<2>(), 2);
-}
-
-
-
-int main ()
-{
-  std::ofstream logfile("stack_trace.output");
-  deallog.attach(logfile);
-  deallog.depth_console(0);
-  deallog.threshold_double(1.e-10);
-
-  try { test1a (); }
-  catch (std::exception &exc) {
-    deallog << "  caught exception:" << std::endl
-           << exc.what() << std::endl;
-  }
-
-  try { test1b (); }
-  catch (std::exception &exc) {
-    deallog << "  caught exception:" << std::endl
-           << exc.what() << std::endl;
-  }
-
-  try { test2 (); }
-  catch (std::exception &exc) {
-    deallog << "  caught exception:" << std::endl
-           << exc.what() << 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.