message: Added some more tests to the metric initialization to try to figure out Issue 602
diff: @@ -18,6 +18,8 @@ TEST(StanUiCommand, metric_file_test) {
  std::vector<std::string> engines = { "static", "nuts" };
  std::vector<std::string> metrics = { "diag_e", "dense_e" };
  std::vector<std::string> adapts = { "0", "1" };
  + std::vector<std::string> stepsizes = { "0.1", "0.5", "1.25" };
  + std::vector<std::string> num_warmups = { "0", "1", "100" };
  std::map<std::string, std::map<std::string, std::string> > expected_output = {
  { "proper", {
  @@ -36,6 +38,8 @@ TEST(StanUiCommand, metric_file_test) {
  for (auto engine : engines) {
  for (auto metric : metrics) {
  for (auto adapt : adapts) {
  + for (auto stepsize : stepsizes) {
  + for (auto num_warmup : num_warmups) {
  std::vector<std::string> model_path;
  model_path.push_back("src");
  model_path.push_back("test");
  @@ -46,13 +50,15 @@ TEST(StanUiCommand, metric_file_test) {
  metric_file_path.push_back("src");
  metric_file_path.push_back("test");
  metric_file_path.push_back("test-models");
  - metric_file_path.push_back(model + "." + metric + "_metric.dat.R");
  + metric_file_path.push_back(model + "." + metric +
  + "_metric.dat.R");
  std::string command = convert_model_path(model_path) +
  - " method=sample num_samples=1 num_warmup=1 adapt engaged=" + adapt +
  - " algorithm=hmc engine=" + engine + " metric=" + metric +
  + " method=sample num_samples=100 num_warmup=" + num_warmup +
  + " adapt engaged=" + adapt + " algorithm=hmc engine=" + engine +
  + " metric=" + metric +
  " metric_file=" + convert_model_path(metric_file_path) +
  - " output file=test/output.csv";
  + " stepsize=" + stepsize + " output file=test/output.csv";
  run_command_output out = run_command(command);
  EXPECT_EQ(int(stan::services::error_codes::OK), out.err_code);
  @@ -63,7 +69,13 @@ TEST(StanUiCommand, metric_file_test) {
  output_csv_stream.close();
  std::string output = output_sstream.str();
  - EXPECT_EQ(1, count_matches(expected_output[model][metric], output));
  + EXPECT_EQ(1, count_matches(expected_output[model][metric],
  + output));
  + if(adapt == "0")
  + EXPECT_EQ(1, count_matches("# Step size = " + stepsize,
  + output));
  + }
  + }
  }
  }
  }
  