From: bangerth Date: Sun, 30 Jul 2006 16:02:03 +0000 (+0000) Subject: Rewrite test so that it a) tests more, and b) aborts when something isn't right X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a716fb8fb238b58f0067352294393ef3bca6064;p=dealii-svn.git Rewrite test so that it a) tests more, and b) aborts when something isn't right git-svn-id: https://svn.dealii.org/trunk@13519 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/fe_tools_14.cc b/tests/bits/fe_tools_14.cc index bc4742ffb1..9c0fa56779 100644 --- a/tests/bits/fe_tools_14.cc +++ b/tests/bits/fe_tools_14.cc @@ -11,7 +11,7 @@ //---------------------------- fe_tools_14.cc --------------------------- #include "../tests.h" -#include "fe_tools_common.cc" +#include "dof_tools_common.cc" // comparison of the results of // FE::face_to_equivalent_cell_index (i) @@ -25,27 +25,15 @@ std::string output_file_name = "fe_tools_14/output"; template void -check_this (const FiniteElement &fe1, - const FiniteElement &fe2) +check_this (const DoFHandler &dof_handler) { - bool ok = true; + const FiniteElement &fe = dof_handler.get_fe(); - for (unsigned int i = 0; i < fe1.dofs_per_face; ++i) - { - if (fe1.face_to_equivalent_cell_index (i) != - fe1.face_to_cell_index (i, 0)) - ok = false; - - } - - for (unsigned int i = 0; i < fe2.dofs_per_face; ++i) - { - if (fe2.face_to_equivalent_cell_index (i) != - fe2.face_to_cell_index (i, 0)) - ok = false; - } + for (unsigned int i = 0; i < fe.dofs_per_face; ++i) + Assert (fe.face_to_equivalent_cell_index (i) == + fe.face_to_cell_index (i, 0), + ExcInternalError()); - ok ? deallog << "OK" << std::endl : - deallog << "Error!" << std::endl; + deallog << "OK" << std::endl; }