Commit 1768a147 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

corrected test data path handling: it should have checked rbegin(), not...

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
parent 1e5a2c0c
...@@ -66,7 +66,7 @@ UnitTestUtil::readWireData(const char* datafile, vector<unsigned char>& data) { ...@@ -66,7 +66,7 @@ UnitTestUtil::readWireData(const char* datafile, vector<unsigned char>& data) {
vector<string>::const_iterator it = config.data_paths_.begin(); vector<string>::const_iterator it = config.data_paths_.begin();
for (; it != config.data_paths_.end(); ++it) { for (; it != config.data_paths_.end(); ++it) {
string data_path = *it; string data_path = *it;
if (data_path.empty() || *data_path.rend() != '/') { if (data_path.empty() || *data_path.rbegin() != '/') {
data_path.push_back('/'); data_path.push_back('/');
} }
ifs.open((data_path + datafile).c_str(), ios_base::in); ifs.open((data_path + datafile).c_str(), ios_base::in);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment