test driver fix

This commit is contained in:
Jean-Francois Dockes 2012-02-17 10:17:12 +01:00
parent f6e50fd9eb
commit 068fa8ccc7

View File

@ -716,7 +716,7 @@ bool RclConfig::getFieldTraits(const string& _fld, const FieldTraits **ftpp)
map<string, FieldTraits>::const_iterator pit = m_fldtotraits.find(fld); map<string, FieldTraits>::const_iterator pit = m_fldtotraits.find(fld);
if (pit != m_fldtotraits.end()) { if (pit != m_fldtotraits.end()) {
*ftpp = &pit->second; *ftpp = &pit->second;
LOGDEB1(("RclConfig::getFieldPrefix: [%s]->[%s]\n", LOGDEB1(("RclConfig::getFieldTraits: [%s]->[%s]\n",
_fld.c_str(), ft.pfx.c_str())); _fld.c_str(), ft.pfx.c_str()));
return true; return true;
} else { } else {
@ -1110,6 +1110,7 @@ using namespace std;
#include "debuglog.h" #include "debuglog.h"
#include "rclinit.h" #include "rclinit.h"
#include "rclconfig.h" #include "rclconfig.h"
#include "cstr.h"
static char *thisprog; static char *thisprog;
@ -1193,9 +1194,13 @@ int main(int argc, char **argv)
cout << "Indexed fields: "; cout << "Indexed fields: ";
for (set<string>::const_iterator it = indexed.begin(); for (set<string>::const_iterator it = indexed.begin();
it != indexed.end(); it++) { it != indexed.end(); it++) {
string prefix; const FieldTraits *ftp;
config->getFieldPrefix(*it, prefix); config->getFieldTraits(*it, &ftp);
cout << "[" << *it << "]" << " -> [" << prefix << "] "; if (ftp)
cout << "[" << *it << "]" << " -> [" << ftp->pfx << "] ";
else
cout << "[" << *it << "]" << " -> [" << "(none)" << "] ";
} }
cout << endl; cout << endl;
} else if (op_flags & OPT_c) { } else if (op_flags & OPT_c) {