From f10d16a7b84eb99a8fb4028f2a8cb9712c381157 Mon Sep 17 00:00:00 2001 From: Pierre Marchand Date: Thu, 7 Sep 2023 23:00:26 +0200 Subject: [PATCH] improve coverage --- include/htool/testing/generator_input.hpp | 18 +++++++++--------- ...ributed_operator_product_complex_double.cpp | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/htool/testing/generator_input.hpp b/include/htool/testing/generator_input.hpp index ffdf06fd..9677435b 100644 --- a/include/htool/testing/generator_input.hpp +++ b/include/htool/testing/generator_input.hpp @@ -74,15 +74,15 @@ void generate_random_scalar(std::complex &coefficient) { coefficient.imag(dist(mersenne_engine)); } -template <> -void generate_random_scalar(int &coefficient) { - int lower_bound = 0; - int upper_bound = 10000; - std::random_device rd; - std::mt19937 mersenne_engine(rd()); - std::uniform_int_distribution dist(lower_bound, upper_bound); - coefficient = dist(mersenne_engine); -} +// template <> +// void generate_random_scalar(int &coefficient) { +// int lower_bound = 0; +// int upper_bound = 10000; +// std::random_device rd; +// std::mt19937 mersenne_engine(rd()); +// std::uniform_int_distribution dist(lower_bound, upper_bound); +// coefficient = dist(mersenne_engine); +// } } // namespace htool diff --git a/tests/functional_tests/distributed_operator/test_distributed_operator_product_complex_double.cpp b/tests/functional_tests/distributed_operator/test_distributed_operator_product_complex_double.cpp index c1ab2e36..24581b02 100644 --- a/tests/functional_tests/distributed_operator/test_distributed_operator_product_complex_double.cpp +++ b/tests/functional_tests/distributed_operator/test_distributed_operator_product_complex_double.cpp @@ -28,6 +28,8 @@ int main(int argc, char *argv[]) { is_error = is_error || test_distributed_operator, GeneratorTestComplex>(number_of_rows, number_of_columns, number_of_right_hand_side, use_permutation, 'N', 'N', operation, offdiagonal_approximation, data_type, epsilon); is_error = is_error || test_distributed_operator, GeneratorTestComplexSymmetric>(number_of_rows, number_of_columns, number_of_right_hand_side, use_permutation, 'S', 'L', operation, offdiagonal_approximation, data_type, epsilon); is_error = is_error || test_distributed_operator, GeneratorTestComplexSymmetric>(number_of_rows, number_of_columns, number_of_right_hand_side, use_permutation, 'S', 'U', operation, offdiagonal_approximation, data_type, epsilon); + is_error = is_error || test_distributed_operator, GeneratorTestComplexHermitian>(number_of_rows, number_of_columns, number_of_right_hand_side, use_permutation, 'H', 'L', operation, offdiagonal_approximation, data_type, epsilon); + is_error = is_error || test_distributed_operator, GeneratorTestComplexHermitian>(number_of_rows, number_of_columns, number_of_right_hand_side, use_permutation, 'H', 'U', operation, offdiagonal_approximation, data_type, epsilon); // Rectangular matrix is_error = is_error || test_distributed_operator, GeneratorTestComplex>(number_of_rows_increased, number_of_columns, number_of_right_hand_side, use_permutation, 'N', 'N', operation, offdiagonal_approximation, data_type, epsilon);