@@ -21,10 +21,10 @@ class CmdStan : public testing::Test {
2121 init3_data = {" src" , " test" , " test-models" , " bern_init2.R" };
2222 init_bad_data = {" src" , " test" , " test-models" , " bern_init_bad.json" };
2323 init_bad_2_data = {" src" , " test" , " test-models" , " bern_init_bad_2.json" };
24- dev_null_path = {" /dev " , " null " };
24+ dummy_output = {" test " , " ignored.csv " };
2525 }
2626 std::vector<std::string> bern_model;
27- std::vector<std::string> dev_null_path ;
27+ std::vector<std::string> dummy_output ;
2828 std::vector<std::string> bern_data;
2929 std::vector<std::string> init_data;
3030 std::vector<std::string> init2_data;
@@ -38,7 +38,7 @@ TEST_F(CmdStan, multi_chain_single_init_file_good) {
3838 std::stringstream ss;
3939 ss << convert_model_path (bern_model)
4040 << " data file=" << convert_model_path (bern_data)
41- << " output file=" << convert_model_path (dev_null_path )
41+ << " output file=" << convert_model_path (dummy_output )
4242 << " init=" << convert_model_path (init_data)
4343 << " method=sample num_chains=2" ;
4444 std::string cmd = ss.str ();
@@ -50,7 +50,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_good) {
5050 std::stringstream ss;
5151 ss << convert_model_path (bern_model)
5252 << " data file=" << convert_model_path (bern_data)
53- << " output file=" << convert_model_path (dev_null_path )
53+ << " output file=" << convert_model_path (dummy_output )
5454 << " init=" << convert_model_path (init2_data)
5555 << " method=sample num_chains=4" ;
5656 std::string cmd = ss.str ();
@@ -62,7 +62,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_comma_good) {
6262 std::stringstream ss;
6363 ss << convert_model_path (bern_model)
6464 << " data file=" << convert_model_path (bern_data)
65- << " output file=" << convert_model_path (dev_null_path )
65+ << " output file=" << convert_model_path (dummy_output )
6666 << " init=" << convert_model_path (init_data) << " ,"
6767 << convert_model_path (init2_3_data) << " method=sample num_chains=2" ;
6868 std::string cmd = ss.str ();
@@ -74,7 +74,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_id_good) {
7474 std::stringstream ss;
7575 ss << convert_model_path (bern_model)
7676 << " data file=" << convert_model_path (bern_data)
77- << " output file=" << convert_model_path (dev_null_path )
77+ << " output file=" << convert_model_path (dummy_output )
7878 << " init=" << convert_model_path (init2_data) << " id=2"
7979 << " method=sample num_chains=2" ;
8080 std::string cmd = ss.str ();
@@ -87,7 +87,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_id_bad) {
8787 std::stringstream ss;
8888 ss << convert_model_path (bern_model)
8989 << " data file=" << convert_model_path (bern_data)
90- << " output file=" << convert_model_path (dev_null_path )
90+ << " output file=" << convert_model_path (dummy_output )
9191 << " init=" << convert_model_path (init2_data) << " id=4"
9292 << " method=sample num_chains=3" ;
9393 std::string cmd = ss.str ();
@@ -101,7 +101,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_comma_missing) {
101101 std::stringstream ss;
102102 ss << convert_model_path (bern_model)
103103 << " data file=" << convert_model_path (bern_data) << " output file="
104- << convert_model_path (dev_null_path )
104+ << convert_model_path (dummy_output )
105105 // second init file does not exist
106106 << " init=" << convert_model_path (init2_data) << " ,"
107107 << convert_model_path (init2_data) << " method=sample num_chains=2" ;
@@ -115,7 +115,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_comma_wrong_number) {
115115 std::stringstream ss;
116116 ss << convert_model_path (bern_model)
117117 << " data file=" << convert_model_path (bern_data)
118- << " output file=" << convert_model_path (dev_null_path )
118+ << " output file=" << convert_model_path (dummy_output )
119119 << " init=" << convert_model_path (init_data) << " ,"
120120 << convert_model_path (init2_3_data) << " method=sample num_chains=3" ;
121121 std::string cmd = ss.str ();
@@ -130,7 +130,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_actually_used) {
130130 std::stringstream ss;
131131 ss << convert_model_path (bern_model)
132132 << " data file=" << convert_model_path (bern_data)
133- << " output file=" << convert_model_path (dev_null_path )
133+ << " output file=" << convert_model_path (dummy_output )
134134 << " init=" << convert_model_path (init_bad_data)
135135 << " method=sample num_chains=2" ;
136136 std::string cmd = ss.str ();
@@ -144,7 +144,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_actually_used_comma) {
144144 std::stringstream ss;
145145 ss << convert_model_path (bern_model)
146146 << " data file=" << convert_model_path (bern_data)
147- << " output file=" << convert_model_path (dev_null_path )
147+ << " output file=" << convert_model_path (dummy_output )
148148 << " init=" << convert_model_path (init_data) << " ,"
149149 << convert_model_path (init_bad_2_data) << " method=sample num_chains=2" ;
150150 std::string cmd = ss.str ();
@@ -157,7 +157,7 @@ TEST_F(CmdStan, multi_chain_multi_init_file_R) {
157157 std::stringstream ss;
158158 ss << convert_model_path (bern_model)
159159 << " data file=" << convert_model_path (bern_data)
160- << " output file=" << convert_model_path (dev_null_path )
160+ << " output file=" << convert_model_path (dummy_output )
161161 << " init=" << convert_model_path (init3_data)
162162 << " method=sample num_chains=4" ;
163163 std::string cmd = ss.str ();
0 commit comments