Browse Source

corrected test data path handling: it should have checked rbegin(), not rend(), to see if the given path ends with '/'.

I believe this is pretty trivial so I'm committing this to trunk directly.  it compiles and passes tests (in fact without this some tests may not pass, depending on environments).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1722 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
1768a147e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/dns/tests/unittest_util.cc

+ 1 - 1
src/lib/dns/tests/unittest_util.cc

@@ -66,7 +66,7 @@ UnitTestUtil::readWireData(const char* datafile, vector<unsigned char>& data) {
     vector<string>::const_iterator it = config.data_paths_.begin();
     for (; it != config.data_paths_.end(); ++it) {
         string data_path = *it;
-        if (data_path.empty() || *data_path.rend() != '/') {
+        if (data_path.empty() || *data_path.rbegin() != '/') {
             data_path.push_back('/');
         }
         ifs.open((data_path + datafile).c_str(), ios_base::in);