updated for latest phreeqcpp

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/ErrorHandling@5947 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2011-12-23 23:33:58 +00:00
parent 89e94dfbc1
commit 1d7aa24d8d
3 changed files with 24 additions and 24 deletions

View File

@ -2129,12 +2129,12 @@ void TestIPhreeqc::TestSetOutputFileName(void)
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Aragonite -1.21 -9.55 -8.34 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Calcite -1.07 -9.55 -8.48 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51 -67.37 -2.86 CH4"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29 -3.76 -1.47 CO2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51* -67.37 -2.86 CH4 Delta_V -54.21 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29* -3.76 -1.47 CO2 Delta_V -18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2(g) -22.00 -25.15 -3.15 H2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51 -0.00 1.51 H2O"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12 -42.08 -2.96 O2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51* -0.00 1.51 H2O Delta_V 18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12* -42.08 -2.96 O2 Delta_V 36.14 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" * with Delta_V * (P - 1) / 2.3RT."), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("------------------"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("End of simulation."), lines[line++] );
@ -2233,12 +2233,12 @@ void TestIPhreeqc::TestSetOutputFileName(void)
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Aragonite -1.21 -9.55 -8.34 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Calcite -1.07 -9.55 -8.48 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51 -67.37 -2.86 CH4"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29 -3.76 -1.47 CO2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51* -67.37 -2.86 CH4 Delta_V -54.21 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29* -3.76 -1.47 CO2 Delta_V -18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2(g) -22.00 -25.15 -3.15 H2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51 -0.00 1.51 H2O"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12 -42.08 -2.96 O2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51* -0.00 1.51 H2O Delta_V 18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12* -42.08 -2.96 O2 Delta_V 36.14 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" * with Delta_V * (P - 1) / 2.3RT."), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("------------------"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("End of simulation."), lines[line++] );

View File

@ -2566,12 +2566,12 @@ void TestIPhreeqcLib::TestSetOutputFileName(void)
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Aragonite -1.21 -9.55 -8.34 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Calcite -1.07 -9.55 -8.48 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51 -67.37 -2.86 CH4"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29 -3.76 -1.47 CO2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51* -67.37 -2.86 CH4 Delta_V -54.21 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29* -3.76 -1.47 CO2 Delta_V -18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2(g) -22.00 -25.15 -3.15 H2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51 -0.00 1.51 H2O"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12 -42.08 -2.96 O2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51* -0.00 1.51 H2O Delta_V 18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12* -42.08 -2.96 O2 Delta_V 36.14 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" * with Delta_V * (P - 1) / 2.3RT."), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("------------------"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("End of simulation."), lines[line++] );
@ -2670,12 +2670,12 @@ void TestIPhreeqcLib::TestSetOutputFileName(void)
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Aragonite -1.21 -9.55 -8.34 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" Calcite -1.07 -9.55 -8.48 CaCO3"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51 -67.37 -2.86 CH4"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29 -3.76 -1.47 CO2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CH4(g) -64.51* -67.37 -2.86 CH4 Delta_V -54.21 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" CO2(g) -2.29* -3.76 -1.47 CO2 Delta_V -18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2(g) -22.00 -25.15 -3.15 H2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51 -0.00 1.51 H2O"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12 -42.08 -2.96 O2"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" H2O(g) -1.51* -0.00 1.51 H2O Delta_V 18.07 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" O2(g) -39.12* -42.08 -2.96 O2 Delta_V 36.14 cm3/mol"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(" * with Delta_V * (P - 1) / 2.3RT."), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string(""), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("------------------"), lines[line++] );
CPPUNIT_ASSERT_EQUAL( std::string("End of simulation."), lines[line++] );

View File

@ -424,15 +424,15 @@ TestSelectedOutput::TestTooManyHeadings()
p.PhreeqcPtr->user_punch_headings = 0;
p.PhreeqcPtr->user_punch_count_headings = 0;
p.PhreeqcPtr->user_punch_headings = (char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings = (const char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings[p.PhreeqcPtr->user_punch_count_headings] = ::strdup("1.name");
p.PhreeqcPtr->user_punch_count_headings++;
p.PhreeqcPtr->user_punch_headings = (char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings = (const char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings[p.PhreeqcPtr->user_punch_count_headings] = ::strdup("1.type");
p.PhreeqcPtr->user_punch_count_headings++;
p.PhreeqcPtr->user_punch_headings = (char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings = (const char**)::realloc(p.PhreeqcPtr->user_punch_headings, (size_t) (p.PhreeqcPtr->user_punch_count_headings + 1) * sizeof(char *));
p.PhreeqcPtr->user_punch_headings[p.PhreeqcPtr->user_punch_count_headings] = ::strdup("1.moles");
p.PhreeqcPtr->user_punch_count_headings++;
@ -449,7 +449,7 @@ TestSelectedOutput::TestTooManyHeadings()
//
for (int i = 0; i < p.PhreeqcPtr->user_punch_count_headings; ++i)
{
::free(p.PhreeqcPtr->user_punch_headings[i]);
::free((void*)p.PhreeqcPtr->user_punch_headings[i]);
}
::free(p.PhreeqcPtr->user_punch_headings);
p.PhreeqcPtr->user_punch_headings = NULL;