From 21e09594645c74dda013cc0e09945a976b95088d Mon Sep 17 00:00:00 2001 From: kanschat Date: Wed, 19 Jul 2006 12:45:54 +0000 Subject: [PATCH] remove abort.cc and adjust reference files git-svn-id: https://svn.dealii.org/trunk@13395 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/Makefile | 66 +++++++++---------- tests/Makefile.rules | 2 +- tests/abort.cc | 41 ------------ tests/base/reference.cc | 27 +------- .../cmp/x86_64-unknown-linux-gnu+gcc4.0 | 16 +++++ tests/base/slice_vector.cc | 30 +-------- tests/bits/accessor_equality/cmp/generic | 3 + 7 files changed, 53 insertions(+), 132 deletions(-) delete mode 100644 tests/abort.cc create mode 100644 tests/base/reference/cmp/x86_64-unknown-linux-gnu+gcc4.0 diff --git a/tests/Makefile b/tests/Makefile index 366fd0ee92..2bbdfd403f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -4,34 +4,34 @@ all: base lac fe deal.II multigrid bits -base: abort.o +base: cd base ; $(MAKE) -lac: abort.o +lac: cd lac ; $(MAKE) -fe: abort.o +fe: cd fe ; $(MAKE) -bits: abort.o +bits: cd bits ; $(MAKE) -deal.II: abort.o +deal.II: cd deal.II ; $(MAKE) -multigrid: abort.o +multigrid: cd multigrid ; $(MAKE) -hp: abort.o +hp: cd hp ; $(MAKE) -report: abort.o +report: @for i in base lac fe deal.II multigrid bits hp all-headers ; do \ echo =======Report: $$i ======= ; \ cd $$i ; $(MAKE) report ; cd .. ; \ done -report+mail: abort.o +report+mail: @for i in base lac fe deal.II multigrid bits hp all-headers ; do \ echo =======Report: $$i ======= ; \ cd $$i ; $(MAKE) report+mail ; cd .. ; \ @@ -42,25 +42,25 @@ report+mail: abort.o build: build-base build-lac build-fe build-deal.II build-multigrid build-bits build-hp -build-base: abort.o +build-base: cd base ; $(MAKE) build -build-lac: abort.o +build-lac: cd lac ; $(MAKE) build -build-fe: abort.o +build-fe: cd fe ; $(MAKE) build -build-bits: abort.o +build-bits: cd bits ; $(MAKE) build -build-deal.II: abort.o +build-deal.II: cd deal.II ; $(MAKE) build -build-multigrid: abort.o +build-multigrid: cd multigrid ; $(MAKE) build -build-hp: abort.o +build-hp: cd hp ; $(MAKE) build @@ -69,25 +69,25 @@ build-hp: abort.o output: output-base output-lac output-fe output-deal.II output-bits output-hp -output-base: abort.o +output-base: cd base ; $(MAKE) output -output-lac: abort.o +output-lac: cd lac ; $(MAKE) output -output-fe: abort.o +output-fe: cd fe ; $(MAKE) output -output-bits: abort.o +output-bits: cd bits ; $(MAKE) output -output-deal.II: abort.o +output-deal.II: cd deal.II ; $(MAKE) output -output-multigrid: abort.o +output-multigrid: cd multigrid ; $(MAKE) output -output-hp: abort.o +output-hp: cd hp ; $(MAKE) output @@ -96,25 +96,25 @@ output-hp: abort.o refs: refs-base refs-lac refs-fe refs-deal.II refs-bits refs-hp -refs-base: abort.o +refs-base: cd base ; $(MAKE) refs -refs-lac: abort.o +refs-lac: cd lac ; $(MAKE) refs -refs-fe: abort.o +refs-fe: cd fe ; $(MAKE) refs -refs-bits: abort.o +refs-bits: cd bits ; $(MAKE) refs -refs-deal.II: abort.o +refs-deal.II: cd deal.II ; $(MAKE) refs -refs-multigrid: abort.o +refs-multigrid: cd multigrid ; $(MAKE) refs -refs-hp: abort.o +refs-hp: cd hp ; $(MAKE) refs @@ -123,10 +123,8 @@ resultname: @echo $(TARGET)+$(GXX-VERSION) clean: clean-base clean-lac clean-deal.II clean-fe clean-bits clean-hp - -rm -f abort.o distclean: distclean-base distclean-lac distclean-deal.II distclean-fe distclean-bits distclean-hp - -rm -f abort.o clean-base: cd base ; $(MAKE) clean @@ -170,10 +168,6 @@ clean-hp: distclean-hp: cd hp ; $(MAKE) distclean - -abort.o: abort.cc - @$(CXX) $(CXXFLAGS.g) -o $@ -c $< - .PHONY : all base lac fe deal.II multigrid bits \ clean clean-base clean-lac clean-fe \ clean-deal.II clean-multigrid clean-bits clean-hp \ diff --git a/tests/Makefile.rules b/tests/Makefile.rules index 6f80292610..1cbe87da6d 100644 --- a/tests/Makefile.rules +++ b/tests/Makefile.rules @@ -42,7 +42,7 @@ endif ###################################################################### %/exe : %/obj.g.$(OBJEXT) @echo =====linking======= $@ - @$(CXX) $(LDFLAGS) -o $@ ../abort.o $^ $(LIBS) + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) ############################################################ diff --git a/tests/abort.cc b/tests/abort.cc deleted file mode 100644 index af2f137bf3..0000000000 --- a/tests/abort.cc +++ /dev/null @@ -1,41 +0,0 @@ -//----------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 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. -// -//----------------------------------------------------------------------- - - -// when linking with the object file generated from this file, calling -// aborts() will not abort the program, but simply resume -// operation. while usually useless, this is used in the test to -// generate the output of a triggered assertion without aborting the -// program. we do this, since we sometimes want to test that some code -// actually generates an assertion, which would otherwise be -// impossible - -#include - -namespace deal_II_exceptions -{ - namespace internals - { - extern unsigned int n_treated_exceptions; - } -} - -extern "C" -void abort() -#ifdef DEAL_II_ABORT_NOTHROW_EXCEPTION - throw () -#endif -{ - deallog << "Abort!!!" << std::endl; - deal_II_exceptions::internals::n_treated_exceptions = 0; -} diff --git a/tests/base/reference.cc b/tests/base/reference.cc index a581f97f44..038476f317 100644 --- a/tests/base/reference.cc +++ b/tests/base/reference.cc @@ -43,31 +43,7 @@ int main() deallog.attach(logfile); deallog.depth_console(0); deallog.threshold_double(1.e-10); - - // we do something rather weird in - // this file: bind the buffer of - // cerr to the log file, so that - // the output of the Assert* macros - // that are written to std::cerr - // end up in the logfiles. - // - // so make sure we store a pointer - // to the old buffer, switch to the - // buffer of the logfile, and at - // the end of main() switch - // back. note that if we don't - // switch back, we get a segfault - // later on in the destruction of - // std::cerr, since it tries to do - // something with its buffer, but - // that is already gone by then -#if __GNUC__ != 2 - std::basic_streambuf *old_cerr_buf = std::cerr.rdbuf(); -#else - streambuf *old_cerr_buf = std::cerr.rdbuf(); -#endif - std::cerr.rdbuf(logfile.rdbuf()); - + if (true) { Test a("A"); @@ -99,6 +75,5 @@ int main() Test d("D"); r = &d; } - std::cerr.rdbuf(old_cerr_buf); } diff --git a/tests/base/reference/cmp/x86_64-unknown-linux-gnu+gcc4.0 b/tests/base/reference/cmp/x86_64-unknown-linux-gnu+gcc4.0 new file mode 100644 index 0000000000..f6cb28670f --- /dev/null +++ b/tests/base/reference/cmp/x86_64-unknown-linux-gnu+gcc4.0 @@ -0,0 +1,16 @@ + +DEAL::Construct A +DEAL::Construct B +DEAL::a mutable +DEAL::b const +DEAL::r mutable +DEAL::s const +DEAL::t mutable +DEAL::u const +DEAL::Construct C +DEAL::Construct D +DEAL::Destruct D +DEAL::ExcInUse(counter, object_info->name(), infostring) +DEAL::Destruct C +DEAL::Destruct B +DEAL::Destruct A diff --git a/tests/base/slice_vector.cc b/tests/base/slice_vector.cc index 0bd48d878e..54776a2cc0 100644 --- a/tests/base/slice_vector.cc +++ b/tests/base/slice_vector.cc @@ -26,8 +26,8 @@ void f(const std::vector& v) s = make_slice(v,2,3); for (unsigned int i=0;i *old_cerr_buf = std::cerr.rdbuf(); -#else - streambuf *old_cerr_buf = std::cerr.rdbuf(); -#endif - std::cerr.rdbuf(logfile.rdbuf()); std::vector v(7); @@ -82,6 +58,4 @@ int main() make_slice(v, 3, 5); int n = s[4]; n += 3; - - std::cerr.rdbuf(old_cerr_buf); } diff --git a/tests/bits/accessor_equality/cmp/generic b/tests/bits/accessor_equality/cmp/generic index e3bb30c412..9f3bf94cb4 100644 --- a/tests/bits/accessor_equality/cmp/generic +++ b/tests/bits/accessor_equality/cmp/generic @@ -1,7 +1,10 @@ DEAL::1d DEAL::1.0 +DEAL::ExcCantCompareIterators() DEAL::2d DEAL::1.0 +DEAL::ExcCantCompareIterators() DEAL::3d DEAL::1.0 +DEAL::ExcCantCompareIterators() -- 2.39.5