From bb6633eb5b2f9477f78fe951ce7ba55bbadebab8 Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Tue, 22 Sep 2015 18:47:56 +0200 Subject: [PATCH] Eliminating verbosity from test --- src/Grid/grid_dist_id_unit_test.hpp | 13 ++++++++----- src/Vector/vector_dist_unit_test.hpp | 10 ++++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Grid/grid_dist_id_unit_test.hpp b/src/Grid/grid_dist_id_unit_test.hpp index 8f2ccbb7..a24d3a08 100644 --- a/src/Grid/grid_dist_id_unit_test.hpp +++ b/src/Grid/grid_dist_id_unit_test.hpp @@ -80,12 +80,12 @@ void Test2D(const Box<2,float> & domain, long int k) big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test( "Testing 2D grid k<=",k); + // 2D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 2D grid k=" << k ); - print_test( "Testing 2D grid k=",k); - //! [Create and access a distributed grid] @@ -185,11 +185,12 @@ void Test3D(const Box<3,float> & domain, long int k) big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test( "Testing 3D grid k<=",k); + // 2D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 3D grid k=" << k ); - print_test( "Testing 3D grid k=",k); // grid size size_t sz[3]; @@ -295,11 +296,12 @@ void Test2D_complex(const Box<2,float> & domain, long int k) big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test( "Testing 2D complex grid k<=",k); + // 2D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 2D complex grid k=" << k ); - print_test( "Testing 2D complex grid k=",k); //! [Create and access a distributed grid complex] @@ -458,11 +460,12 @@ void Test3D_complex(const Box<3,float> & domain, long int k) big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test( "Testing 3D grid complex k<=",k); + // 2D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 3D complex grid k=" << k ); - print_test( "Testing 3D grid complex k=",k); // grid size size_t sz[3]; diff --git a/src/Vector/vector_dist_unit_test.hpp b/src/Vector/vector_dist_unit_test.hpp index 21cae3dd..522d6bcd 100644 --- a/src/Vector/vector_dist_unit_test.hpp +++ b/src/Vector/vector_dist_unit_test.hpp @@ -195,17 +195,18 @@ BOOST_AUTO_TEST_CASE( vector_dist_iterator_test_use_2d ) std::default_random_engine eg; std::uniform_real_distribution<float> ud(0.0f, 1.0f); - size_t k = 4096 * v_cl.getProcessingUnits(); + long int k = 4096 * v_cl.getProcessingUnits(); long int big_step = k / 30; big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test_v( "Testing 2D vector k<=",k); + // 2D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 2D vector k=" << k ); - print_test_v( "Testing 2D vector k=",k); Box<2,float> box({0.0,0.0},{1.0,1.0}); vector_dist<2,float, Point_test<float>, CartDecomposition<2,float> > vd(k,box); @@ -259,17 +260,18 @@ BOOST_AUTO_TEST_CASE( vector_dist_iterator_test_use_3d ) std::default_random_engine eg; std::uniform_real_distribution<float> ud(0.0f, 1.0f); - size_t k = 4096 * v_cl.getProcessingUnits(); + long int k = 4096 * v_cl.getProcessingUnits(); long int big_step = k / 30; big_step = (big_step == 0)?1:big_step; long int small_step = 1; + print_test_v( "Testing 3D vector k<=",k); + // 3D test for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step ) { BOOST_TEST_CHECKPOINT( "Testing 3D vector k=" << k ); - print_test_v( "Testing 3D vector k=",k); Box<3,float> box({0.0,0.0,0.0},{1.0,1.0,1.0}); vector_dist<3,float, Point_test<float>, CartDecomposition<3,float> > vd(k,box); -- GitLab