From 1d7aa24d8df4dd63c37f68ba4627d80409da0a6c Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Fri, 23 Dec 2011 23:33:58 +0000 Subject: [PATCH] updated for latest phreeqcpp git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/ErrorHandling@5947 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- unit/TestIPhreeqc.cpp | 20 ++++++++++---------- unit/TestIPhreeqcLib.cpp | 20 ++++++++++---------- unit/TestSelectedOutput.cpp | 8 ++++---- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/unit/TestIPhreeqc.cpp b/unit/TestIPhreeqc.cpp index ebd26d7a..235f48d8 100644 --- a/unit/TestIPhreeqc.cpp +++ b/unit/TestIPhreeqc.cpp @@ -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++] ); diff --git a/unit/TestIPhreeqcLib.cpp b/unit/TestIPhreeqcLib.cpp index 1b2d7151..4097c659 100644 --- a/unit/TestIPhreeqcLib.cpp +++ b/unit/TestIPhreeqcLib.cpp @@ -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++] ); diff --git a/unit/TestSelectedOutput.cpp b/unit/TestSelectedOutput.cpp index f5978fed..f61cb03a 100644 --- a/unit/TestSelectedOutput.cpp +++ b/unit/TestSelectedOutput.cpp @@ -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;