Skip to content

Commit

Permalink
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-buildbot committed Oct 30, 2024
1 parent 22f8176 commit 04b0016
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
20 changes: 11 additions & 9 deletions src/cmdstan/stansummary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
8 changes: 4 additions & 4 deletions src/test/interface/stansummary_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,15 +591,15 @@ TEST(CommandStansummary, check_csv_output_include_param) {
}

TEST(CommandStansummary, check_csv_output_include_param_order) {
std::vector<std::string> expect_names = {"y[1,1]", "y[2,2]", "y[2,1]", "y[1,3]"};
std::vector<std::string> 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);
Expand Down

0 comments on commit 04b0016

Please sign in to comment.