From 61d0da01150dd693d9d56318ec511c893f50bd15 Mon Sep 17 00:00:00 2001 From: Timo Heister <timo.heister@gmail.com> Date: Sun, 2 Jun 2013 22:22:01 +0000 Subject: [PATCH] update test git-svn-id: https://svn.dealii.org/trunk@29729 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/get_dof_indices_01.cc | 18 ++++++++++++++---- tests/bits/get_dof_indices_01/cmp/generic | 6 +++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tests/bits/get_dof_indices_01.cc b/tests/bits/get_dof_indices_01.cc index f97d6958d1..1066610b07 100644 --- a/tests/bits/get_dof_indices_01.cc +++ b/tests/bits/get_dof_indices_01.cc @@ -12,8 +12,8 @@ //---------------------------- get_dof_indices_01.cc --------------------------- -// make sure we can call DoFCellAccessor::get_dof_indices also for -// inactive cells +// we used to be able to call DoFCellAccessor::get_dof_indices also for +// inactive cells, check that this is now forbidden. #include "../tests.h" #include <deal.II/base/function.h> @@ -57,8 +57,17 @@ void test () for (typename DoFHandler<dim>::cell_iterator cell=dof_handler.begin(); cell != dof_handler.end(); ++cell) { - cell->get_dof_indices (local_dof_indices); - + try + { + cell->get_dof_indices (local_dof_indices); + } + catch(...) + { + deallog << "Assertion: cell not active." << std::endl; + continue; + } + + deallog << "Cell = " << cell << ", DoFs="; for (unsigned int i=0; i<fe.dofs_per_cell; ++i) @@ -76,6 +85,7 @@ void test () int main () { + deal_II_exceptions::disable_abort_on_exception(); std::ofstream logfile("get_dof_indices_01/output"); deallog.attach(logfile); deallog.depth_console(0); diff --git a/tests/bits/get_dof_indices_01/cmp/generic b/tests/bits/get_dof_indices_01/cmp/generic index e6001e8a8e..743ebece81 100644 --- a/tests/bits/get_dof_indices_01/cmp/generic +++ b/tests/bits/get_dof_indices_01/cmp/generic @@ -1,13 +1,13 @@ -DEAL::Cell = 0.0, DoFs=0 2 +DEAL::Assertion: cell not active. DEAL::Cell = 1.0, DoFs=0 1 DEAL::Cell = 1.1, DoFs=1 2 -DEAL::Cell = 0.0, DoFs=0 4 6 8 +DEAL::Assertion: cell not active. DEAL::Cell = 1.0, DoFs=0 1 2 3 DEAL::Cell = 1.1, DoFs=1 4 3 5 DEAL::Cell = 1.2, DoFs=2 3 6 7 DEAL::Cell = 1.3, DoFs=3 5 7 8 -DEAL::Cell = 0.0, DoFs=0 8 12 16 18 22 24 26 +DEAL::Assertion: cell not active. DEAL::Cell = 1.0, DoFs=0 1 2 3 4 5 6 7 DEAL::Cell = 1.1, DoFs=1 8 3 9 5 10 7 11 DEAL::Cell = 1.2, DoFs=2 3 12 13 6 7 14 15 -- 2.39.5