added include for strstr

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@7136 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
Scott R Charlton 2012-11-30 08:17:38 +00:00
parent 38a930e09e
commit 28be24da1d
3 changed files with 12 additions and 11 deletions

View File

@ -79,7 +79,6 @@ PPOBJS = \
runner.o \
Solution.o \
SolutionIsotope.o \
SolutionIsotopeList.o \
SSassemblage.o \
SS.o \
StorageBin.o \

View File

@ -3180,54 +3180,55 @@ void TestIPhreeqc::TestLongUser_Punch(void)
std::ostringstream oss;
PHRQ_io::fpunchf_helper(&oss, "%2046.2046s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2046, oss.str().size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
std::string s0(oss.str());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(s0));
oss.clear(); oss.seekp(0);
PHRQ_io::fpunchf_helper(&oss, "%2047.2047s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2047, oss.str().size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
oss.clear(); oss.seekp(0);
PHRQ_io::fpunchf_helper(&oss, "%2048.2048s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2048, oss.str().size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
oss.clear(); oss.seekp(0);
PHRQ_io::fpunchf_helper(&oss, "%2049.2049s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2049, oss.str().size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
oss.clear(); oss.seekp(0);
PHRQ_io::fpunchf_helper(&oss, "%2050.2050s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2050, oss.str().size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(oss.str()));
// string tests
std::string str;
PHRQ_io::fpunchf_helper(&str, "%2046.2046s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2046, str.size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
str.clear();
PHRQ_io::fpunchf_helper(&str, "%2047.2047s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2047, str.size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
str.clear();
PHRQ_io::fpunchf_helper(&str, "%2048.2048s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2048, str.size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
str.clear();
PHRQ_io::fpunchf_helper(&str, "%2049.2049s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2049, str.size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
str.clear();
PHRQ_io::fpunchf_helper(&str, "%2050.2050s", "TEST");
CPPUNIT_ASSERT_EQUAL((size_t)2050, str.size());
CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
//CPPUNIT_ASSERT_EQUAL(std::string("TEST"), trim(str));
const char input[] =
"PRINT\n"

View File

@ -8,6 +8,7 @@
#include <fstream>
#include <string>
#include <string.h> // strstr
#include <cmath>
#include <cfloat>
#include <stdlib.h>