diff --git a/tests/Unit/Domain/Creators/Test_Sphere.cpp b/tests/Unit/Domain/Creators/Test_Sphere.cpp index 731310d3545f6..cdada6031d21a 100644 --- a/tests/Unit/Domain/Creators/Test_Sphere.cpp +++ b/tests/Unit/Domain/Creators/Test_Sphere.cpp @@ -377,7 +377,7 @@ void test_sphere_construction( // SphericalCompression map since the shape map is the identity // currently const double min_radius = inner_radius; - const double max_radius = radial_partitioning.size() > 0 + const double max_radius = not radial_partitioning.empty() ? radial_partitioning[0] : outer_radius; const double func = @@ -632,7 +632,7 @@ void test_sphere() { const size_t l_max = 10; const std::vector times{1., 10.}; - for (auto [interior_index, equiangular, equatorial_compression, array_index, + for (auto [interior_index, equiangular, equatorial_compression, index, which_wedges, time_dependent, use_hard_coded_time_dep_options, with_boundary_conditions] : random_sample<5>( @@ -666,13 +666,10 @@ void test_sphere() { // If we are using hard coded maps, we need at least two shells (or one // radial partition) for the translation map. - if (use_hard_coded_time_dep_options and - radial_partitioning[array_index].empty()) { - // If there is no radial partition, go to the next index to get one - // partition - ++array_index; - } - + const auto array_index = + (use_hard_coded_time_dep_options and radial_partitioning[index].empty() + ? index + 1 + : index); CAPTURE(radial_partitioning[array_index]); CAPTURE(radial_distribution[array_index]);