I fixed the test that I broke yesterday.
authorRoker <roker@pep-project.org>
Wed, 22 Jun 2016 10:03:35 +0200
changeset 753dd21cdff7492
parent 752 9c53a8bc555d
child 754 2aab9c3e29ca
child 755 3bac36e6fb86
child 757 667fbb1ee478
I fixed the test that I broke yesterday.
test/pEpEngineTest.cc
     1.1 --- a/test/pEpEngineTest.cc	Tue Jun 21 18:08:05 2016 +0200
     1.2 +++ b/test/pEpEngineTest.cc	Wed Jun 22 10:03:35 2016 +0200
     1.3 @@ -13,7 +13,7 @@
     1.4  
     1.5  using namespace std;
     1.6  
     1.7 -typedef std::vector<char> Buffer;
     1.8 +typedef std::string Buffer;
     1.9  
    1.10  // no C++11, yet? So do our own implementation:
    1.11  namespace{
    1.12 @@ -41,11 +41,10 @@
    1.13      txtFile.seekg (0, txtFile.end);
    1.14      const size_t length = txtFile.tellg();
    1.15      txtFile.seekg (0, txtFile.beg);
    1.16 -    buffer.resize(length+1);
    1.17 +    buffer.resize(length);
    1.18  
    1.19      cout << "Reading " << length << " characters... ";
    1.20 -    txtFile.read (buffer.data(), length);
    1.21 -    buffer.at(length)='\0';
    1.22 +    txtFile.read (&buffer[0], length);
    1.23  
    1.24      if (!txtFile)
    1.25      {