diff --git a/test_problems/cathermo/DH_graph_1/.cvsignore b/test_problems/cathermo/DH_graph_1/.cvsignore index cfcf9c707..0ebf5cb72 100644 --- a/test_problems/cathermo/DH_graph_1/.cvsignore +++ b/test_problems/cathermo/DH_graph_1/.cvsignore @@ -6,6 +6,7 @@ DH_NaCl_acommon.csv DH_NaCl_bdotak.csv DH_NaCl_dilute.csv DH_graph_1 +DH_graph_1.log DH_graph_1.d DH_graph_1.out csvCode.txt diff --git a/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp b/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp index 08d0ac7f2..1055a6a0e 100644 --- a/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp +++ b/test_problems/cathermo/DH_graph_1/DH_graph_1.cpp @@ -26,11 +26,12 @@ class fileLog: public Logger { public: fileLog(string fName) { m_fName = fName; - m_fs.open(fName.c_str()); + m_fs.open(fName.c_str()); } virtual void write(const string& msg) { m_fs << msg; + m_fs << endl; } virtual ~fileLog() { @@ -38,7 +39,7 @@ public: } string m_fName; - fstream m_fs; + ofstream m_fs; }; @@ -73,7 +74,8 @@ int main(int argc, char **argv) int retn = 0; int i; - string commandFile = "vcs_Cantera.inp"; + string fName = "DH_graph_1.log"; + fileLog *fl = new fileLog(fName); try { char iFile[80]; @@ -81,7 +83,6 @@ int main(int argc, char **argv) if (argc > 1) { strcpy(iFile, argv[1]); } - fileLog *fl = new fileLog("DH_graph_1.log"); setLogger(fl); DebyeHuckel *DH = new DebyeHuckel(iFile, "NaCl_electrolyte"); @@ -137,8 +138,10 @@ int main(int argc, char **argv) return retn; } catch (CanteraError) { - showErrors(); + if (fl) { + delete fl; + } return -1; } } diff --git a/test_problems/cathermo/DH_graph_1/runtest b/test_problems/cathermo/DH_graph_1/runtest index 47a935a55..60de953e0 100755 --- a/test_problems/cathermo/DH_graph_1/runtest +++ b/test_problems/cathermo/DH_graph_1/runtest @@ -13,6 +13,10 @@ fi temp_success="0" /bin/rm -f output.txt outputa.txt ########################################################################## +CANTERA_DATA=${CANTERA_DATA:=../../../data/inputs}; export CANTERA_DATA + +CANTERA_BIN=${CANTERA_BIN:=../../../bin} + prog=DH_graph_1 if test ! -x $prog ; then echo $prog ' does not exist' @@ -22,6 +26,7 @@ fi /bin/rm -f test.out test.diff DH_graph_1.out echo 'Testing the DH dilute act calculation - act vs I' +/bin/rm -f DH_graph_1.out $prog DH_NaCl_dilute.xml > DH_graph_1.out retnStat=$? echo 'Making a comparison with the good saved solution: ' @@ -46,6 +51,7 @@ fi /bin/rm -f test.out test.diff DH_NaCl_acommon.csv echo 'Testing the DH dilute act calculation - act vs I' +/bin/rm DH_NaCl_acommon.csv $prog DH_NaCl_acommon.xml > DH_NaCl_acommon.csv retnStat=$? echo 'Making a comparison with the good saved solution: '