From 72b8ba7d3c1ad17ad0d78f1f318dadb4c3f4c7f4 Mon Sep 17 00:00:00 2001 From: guido Date: Mon, 8 Dec 2003 15:02:54 +0000 Subject: [PATCH] link non-abort to all functions and reset n_treated_exceptions to see all of them git-svn-id: https://svn.dealii.org/trunk@8246 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/Makefile | 14 +++++++------ tests/Makefile.rules | 2 +- tests/{base => }/abort.cc | 12 ++++++++++- tests/base/Makefile | 6 +++--- tests/lac/Makefile | 2 +- tests/lac/abort.cc | 16 -------------- .../lac/block_vector.output | 21 ++++++++++++++++++- 7 files changed, 44 insertions(+), 29 deletions(-) rename tests/{base => }/abort.cc (84%) delete mode 100644 tests/lac/abort.cc diff --git a/tests/Makefile b/tests/Makefile index da06e58a0e..a8d96a706d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -4,22 +4,22 @@ all: compare base lac fe deal.II bits -base: compare +base: compare abort.o cd base ; $(MAKE) -lac: compare +lac: compare abort.o cd lac ; $(MAKE) -fe: compare +fe: compare abort.o cd fe ; $(MAKE) -bits: compare +bits: compare abort.o cd bits ; $(MAKE) -deal.II: compare +deal.II: compare abort.o cd deal.II ; $(MAKE) -report: compare +report: compare abort.o @for i in base lac fe deal.II bits ; do \ echo =======Report: $$i ======= ; \ cd $$i ; $(MAKE) report ; cd .. ; \ @@ -110,6 +110,8 @@ clean-bits: veryclean-bits: cd bits ; $(MAKE) veryclean +abort.o: abort.cc + @$(CXX) -ggdb -o $@ -c $< .PHONY : all base lac fe deal.II bits \ clean clean-base clean-lac clean-fe clean-deal.II clean-bits \ diff --git a/tests/Makefile.rules b/tests/Makefile.rules index 19417b3078..941edeaf29 100644 --- a/tests/Makefile.rules +++ b/tests/Makefile.rules @@ -38,7 +38,7 @@ endif ###################################################################### %.exe : @echo =====linking======= $@ - @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) + @$(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) ../abort.o ############################################################ diff --git a/tests/base/abort.cc b/tests/abort.cc similarity index 84% rename from tests/base/abort.cc rename to tests/abort.cc index c599f6c3a5..e42e412403 100644 --- a/tests/base/abort.cc +++ b/tests/abort.cc @@ -20,6 +20,16 @@ // actually generates an assertion, which would otherwise be // impossible +namespace deal_II_exceptions +{ + namespace internals + { + extern unsigned int n_treated_exceptions; + } +}; + extern "C" void abort() -{} +{ + deal_II_exceptions::internals::n_treated_exceptions = 0; +} diff --git a/tests/base/Makefile b/tests/base/Makefile index 762c1b070b..cd6de3b3e3 100644 --- a/tests/base/Makefile +++ b/tests/base/Makefile @@ -26,19 +26,19 @@ threads.cc : threads.pl data_out_base.exe : data_out_base.g.$(OBJEXT) $(lib-base.g) logtest.exe : logtest.g.$(OBJEXT) $(lib-base.g) -polynomial_test.exe: polynomial_test.g.$(OBJEXT) abort.g.$(OBJEXT) $(lib-base.g) +polynomial_test.exe: polynomial_test.g.$(OBJEXT) $(lib-base.g) polynomial1d.exe : polynomial1d.g.$(OBJEXT) $(lib-base.g) quadrature_test.exe: quadrature_test.g.$(OBJEXT) $(lib-base.g) quadrature_selector.exe: quadrature_selector.g.$(OBJEXT) $(lib-base.g) -reference.exe : reference.g.$(OBJEXT) abort.g.$(OBJEXT) $(lib-base.g) +reference.exe : reference.g.$(OBJEXT) $(lib-base.g) table.exe : table.g.$(OBJEXT) $(lib-base.g) tensor.exe : tensor.g.$(OBJEXT) $(lib-base.g) timer.exe : timer.g.$(OBJEXT) $(lib-base.g) threads.exe : threads.g.$(OBJEXT) $(lib-base.g) -auto_derivative_function.exe : auto_derivative_function.g.$(OBJEXT) $(libraries) anisotropic_1.exe : anisotropic_1.g.$(OBJEXT) $(lib-base.g) anisotropic_2.exe : anisotropic_2.g.$(OBJEXT) $(lib-base.g) hierarchical.exe : hierarchical.g.$(OBJEXT) $(lib-base.g) +auto_derivative_function.exe : auto_derivative_function.g.$(OBJEXT) $(libraries) $(lib-base.g) tests = logtest reference quadrature_test quadrature_selector table tensor \ timer threads polynomial1d polynomial_test \ diff --git a/tests/lac/Makefile b/tests/lac/Makefile index 1ec83d497f..75fb41e693 100644 --- a/tests/lac/Makefile +++ b/tests/lac/Makefile @@ -21,7 +21,7 @@ default: run-tests ############################################################ block_matrices.exe : block_matrices.g.$(OBJEXT) $(libraries) -block_vector.exe : block_vector.g.$(OBJEXT) abort.g.$(OBJEXT) $(libraries) +block_vector.exe : block_vector.g.$(OBJEXT) $(libraries) block_vector_iterator.exe : block_vector_iterator.g.$(OBJEXT) $(libraries) full_matrix.exe : full_matrix.g.$(OBJEXT) $(libraries) matrix_out.exe : matrix_out.g.$(OBJEXT) $(libraries) diff --git a/tests/lac/abort.cc b/tests/lac/abort.cc deleted file mode 100644 index 04de05ab43..0000000000 --- a/tests/lac/abort.cc +++ /dev/null @@ -1,16 +0,0 @@ -//----------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 1998, 1999, 2000, 2001 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. -// -//----------------------------------------------------------------------- - -extern "C" -void abort() -{} diff --git a/tests/results/i686-pc-linux-gnu+gcc3.2/lac/block_vector.output b/tests/results/i686-pc-linux-gnu+gcc3.2/lac/block_vector.output index 76de12bee0..0f9d30ee16 100644 --- a/tests/results/i686-pc-linux-gnu+gcc3.2/lac/block_vector.output +++ b/tests/results/i686-pc-linux-gnu+gcc3.2/lac/block_vector.output @@ -37,7 +37,26 @@ The name and call sequence of the exception was: Additional Information: Index 3 is not in [0,3[ -------------------------------------------------------- -******** More assertions fail but messages are suppressed! ******** +-------------------------------------------------------- +An error occurred in file in function + unsigned int BlockIndices::local_to_global(unsigned int, unsigned int) const +The violated condition was: + index < start_indices[block+1]-start_indices[block] +The name and call sequence of the exception was: + ExcIndexRange (index, 0, start_indices[block+1]-start_indices[block]) +Additional Information: +Index 2 is not in [0,2[ +-------------------------------------------------------- +-------------------------------------------------------- +An error occurred in file in function + unsigned int BlockIndices::local_to_global(unsigned int, unsigned int) const +The violated condition was: + block < n_blocks +The name and call sequence of the exception was: + ExcIndexRange(block, 0, n_blocks) +Additional Information: +Index 2 is not in [0,2[ +-------------------------------------------------------- DEAL:BlockVector:Constructor with iterators::0.000 1.000 2.000 3.000 4.000 5.000 DEAL:BlockVector:Constructor with iterators::0 0 0.000 DEAL:BlockVector:Constructor with iterators::0 1 1.000 -- 2.39.5