From: Bruno Turcksin Date: Fri, 23 Aug 2013 21:24:55 +0000 (+0000) Subject: Fix bugs in deal.II tests. X-Git-Tag: v8.1.0~570^2~413 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bca7f20516d2be2d351b5aeacdffaab335537888;p=dealii.git Fix bugs in deal.II tests. git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30461 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/deal.II/face_orientations_3d.cc b/tests/deal.II/face_orientations_3d.cc index 739445d436..b838cece93 100644 --- a/tests/deal.II/face_orientations_3d.cc +++ b/tests/deal.II/face_orientations_3d.cc @@ -82,12 +82,12 @@ int main () deallog.depth_console(0); deallog.threshold_double(1.e-10); - test ("grid_in_3d/1.in"); - test ("grid_in_3d/2.in"); - test ("grid_in_3d/3.in"); - test ("grid_in_3d/4.in"); + test (SOURCE_DIR "/grid_in_3d/1.in"); + test (SOURCE_DIR "/grid_in_3d/2.in"); + test (SOURCE_DIR "/grid_in_3d/3.in"); + test (SOURCE_DIR "/grid_in_3d/4.in"); - test ("grid_in_3d/evil_0.in"); - test ("grid_in_3d/evil_4.in"); + test (SOURCE_DIR "/grid_in_3d/evil_0.in"); + test (SOURCE_DIR "/grid_in_3d/evil_4.in"); } diff --git a/tests/deal.II/grid_in.cc b/tests/deal.II/grid_in.cc index 0e798ed36f..93b9e8c757 100644 --- a/tests/deal.II/grid_in.cc +++ b/tests/deal.II/grid_in.cc @@ -41,7 +41,7 @@ void test1 () Triangulation tria; GridIn gi; gi.attach_triangulation (tria); - std::ifstream in ("2d.inp"); + std::ifstream in (SOURCE_DIR "/grid_in/2d.inp"); gi.read_ucd (in); GridOut grid_out; @@ -72,7 +72,7 @@ void test2 () Triangulation tria (Triangulation::none, true); GridIn gi; gi.attach_triangulation (tria); - std::ifstream in ("2d.xda"); + std::ifstream in (SOURCE_DIR "/grid_in/2d.xda"); try { gi.read_xda (in); @@ -103,7 +103,7 @@ void test3 () Triangulation tria; GridIn gi; gi.attach_triangulation (tria); - gi.read ("2d.nc"); + gi.read (SOURCE_DIR "/grid_in/2d.nc"); GridOut grid_out; std::ofstream gnufile("grid_in_2d.gnuplot"); @@ -137,8 +137,8 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("2d"), GridIn<2>::ucd); - check_file<2> (std::string("2d"), GridIn<2>::xda); + check_file<2> (std::string(SOURCE_DIR "/grid_in/2d"), GridIn<2>::ucd); + check_file<2> (std::string(SOURCE_DIR "/grid_in/2d"), GridIn<2>::xda); } diff --git a/tests/deal.II/grid_in_02.cc b/tests/deal.II/grid_in_02.cc index 470efab763..a244e9bdbc 100644 --- a/tests/deal.II/grid_in_02.cc +++ b/tests/deal.II/grid_in_02.cc @@ -56,7 +56,7 @@ void test2 () Triangulation tria (Triangulation::none, true); GridIn gi; gi.attach_triangulation (tria); - std::ifstream in ("2d.xda"); + std::ifstream in (SOURCE_DIR "/grid_in_02/2d.xda"); try { gi.read_xda (in); diff --git a/tests/deal.II/grid_in_msh.cc b/tests/deal.II/grid_in_msh.cc index 7dc0ade009..11c96757f1 100644 --- a/tests/deal.II/grid_in_msh.cc +++ b/tests/deal.II/grid_in_msh.cc @@ -55,7 +55,7 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("mesh"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh/mesh"), GridIn<2>::msh); } diff --git a/tests/deal.II/grid_in_msh_02.cc b/tests/deal.II/grid_in_msh_02.cc index 1f71d6154b..cbc40de425 100644 --- a/tests/deal.II/grid_in_msh_02.cc +++ b/tests/deal.II/grid_in_msh_02.cc @@ -57,7 +57,7 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("mesh"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_02/mesh"), GridIn<2>::msh); } diff --git a/tests/deal.II/grid_in_msh_03.cc b/tests/deal.II/grid_in_msh_03.cc index 1f71d6154b..0fbe53bd04 100644 --- a/tests/deal.II/grid_in_msh_03.cc +++ b/tests/deal.II/grid_in_msh_03.cc @@ -57,7 +57,7 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("mesh"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_03/mesh"), GridIn<2>::msh); } diff --git a/tests/deal.II/grid_in_msh_version_1.cc b/tests/deal.II/grid_in_msh_version_1.cc index d5ea54052f..e04525c6ad 100644 --- a/tests/deal.II/grid_in_msh_version_1.cc +++ b/tests/deal.II/grid_in_msh_version_1.cc @@ -57,8 +57,8 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("input_v1"), GridIn<2>::msh); - check_file<2> (std::string("input_v2"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_version_1/input_v1"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_version_1/input_v2"), GridIn<2>::msh); } diff --git a/tests/deal.II/grid_in_msh_version_2.cc b/tests/deal.II/grid_in_msh_version_2.cc index 93051a9b37..9e0f3f444f 100644 --- a/tests/deal.II/grid_in_msh_version_2.cc +++ b/tests/deal.II/grid_in_msh_version_2.cc @@ -56,8 +56,8 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("hole81"), GridIn<2>::msh); - check_file<2> (std::string("hole8170"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_version_2/hole81"), GridIn<2>::msh); + check_file<2> (std::string(SOURCE_DIR "/grid_in_msh_version_2/hole8170"), GridIn<2>::msh); } diff --git a/tests/deal.II/grid_in_tecplot.cc b/tests/deal.II/grid_in_tecplot.cc index ce97d05117..ad8448afe9 100644 --- a/tests/deal.II/grid_in_tecplot.cc +++ b/tests/deal.II/grid_in_tecplot.cc @@ -47,9 +47,9 @@ void test (const std::string &infilename) int main () { - test<2> ("1.dat"); - test<2> ("2.dat"); - test<2> ("3.dat"); - test<2> ("4.dat"); + test<2> (std::string(SOURCE_DIR "/grid_in_tecplot/1.dat")); + test<2> (std::string(SOURCE_DIR "/grid_in_tecplot/2.dat")); + test<2> (std::string(SOURCE_DIR "/grid_in_tecplot/3.dat")); + test<2> (std::string(SOURCE_DIR "/grid_in_tecplot/4.dat")); } diff --git a/tests/deal.II/grid_in_unv_2d.cc b/tests/deal.II/grid_in_unv_2d.cc index c062659ded..0eb2dcf9c6 100644 --- a/tests/deal.II/grid_in_unv_2d.cc +++ b/tests/deal.II/grid_in_unv_2d.cc @@ -58,8 +58,8 @@ void check_file (const std::string name, void filename_resolution() { - check_file<2> (std::string("test1427"), GridIn<2>::unv); - check_file<2> (std::string("test46"), GridIn<2>::unv); + check_file<2> (std::string(SOURCE_DIR "/grid_in_unv_2d/test1427"), GridIn<2>::unv); + check_file<2> (std::string(SOURCE_DIR "/grid_in_unv_2d/test46"), GridIn<2>::unv); } diff --git a/tests/deal.II/grid_in_unv_3d.cc b/tests/deal.II/grid_in_unv_3d.cc index 27d9b8bcf9..7522623a8c 100644 --- a/tests/deal.II/grid_in_unv_3d.cc +++ b/tests/deal.II/grid_in_unv_3d.cc @@ -58,7 +58,7 @@ void check_file (const std::string name, void filename_resolution() { - check_file<3> (std::string("3D"), GridIn<3>::unv); + check_file<3> (std::string(SOURCE_DIR "/grid_in_unv_3d/3D"), GridIn<3>::unv); }