From 04b00166ba78616840925e4040b7ebabd73d1b71 Mon Sep 17 00:00:00 2001 From: Stan Jenkins Date: Wed, 30 Oct 2024 14:14:18 -0400 Subject: [PATCH] [Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1 --- src/cmdstan/stansummary.cpp | 20 +++++++++++--------- src/test/interface/stansummary_test.cpp | 8 ++++---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/cmdstan/stansummary.cpp b/src/cmdstan/stansummary.cpp index 97f01a231d..a487ebbc9e 100644 --- a/src/cmdstan/stansummary.cpp +++ b/src/cmdstan/stansummary.cpp @@ -158,16 +158,18 @@ Example: stansummary model_chain_1.csv model_chain_2.csv for (std::string request : requested_params_vec) { auto it = pnames.find(request); if (it == pnames.end()) { - auto find_dups = std::find(invalid_params.begin(), invalid_params.end(), request); - if (find_dups == invalid_params.end()) { - invalid_params.emplace_back(request); - } + auto find_dups + = std::find(invalid_params.begin(), invalid_params.end(), request); + if (find_dups == invalid_params.end()) { + invalid_params.emplace_back(request); + } } else { - valid_params.emplace_back(request); - auto find_dups = std::find(valid_params.begin(), valid_params.end(), request); - if (find_dups == valid_params.end()) { - valid_params.emplace_back(request); - } + valid_params.emplace_back(request); + auto find_dups + = std::find(valid_params.begin(), valid_params.end(), request); + if (find_dups == valid_params.end()) { + valid_params.emplace_back(request); + } } } if (invalid_params.empty()) { diff --git a/src/test/interface/stansummary_test.cpp b/src/test/interface/stansummary_test.cpp index 74535679d0..c469d803db 100644 --- a/src/test/interface/stansummary_test.cpp +++ b/src/test/interface/stansummary_test.cpp @@ -591,15 +591,15 @@ TEST(CommandStansummary, check_csv_output_include_param) { } TEST(CommandStansummary, check_csv_output_include_param_order) { - std::vector expect_names = {"y[1,1]", "y[2,2]", "y[2,1]", "y[1,3]"}; + std::vector expect_names + = {"y[1,1]", "y[2,2]", "y[2,1]", "y[1,3]"}; std::string path_separator; path_separator.push_back(get_path_separator()); std::string csv_file = "src" + path_separator + "test" + path_separator - + "interface" + path_separator + "matrix_output.csv"; + + "interface" + path_separator + "matrix_output.csv"; std::stringstream ss_command; ss_command << "bin" << path_separator << "stansummary " - << " -i y.1.1 -i y.2.2 -i y.2.1 -i y.1.3 " - << csv_file; + << " -i y.1.1 -i y.2.2 -i y.2.1 -i y.1.3 " << csv_file; run_command_output out = run_command(ss_command.str()); ASSERT_FALSE(out.hasError); std::istringstream target_stream(out.output);