summaryrefslogtreecommitdiff
path: root/tests/mgrtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mgrtest.cpp')
-rw-r--r--tests/mgrtest.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/mgrtest.cpp b/tests/mgrtest.cpp
index 602a322..9edeea9 100644
--- a/tests/mgrtest.cpp
+++ b/tests/mgrtest.cpp
@@ -1,29 +1,33 @@
#include <swmgr.h>
-#include <iostream.h>
+#include <iostream>
#include <versekey.h>
+#ifndef NO_SWORD_NAMESPACE
+using namespace sword;
+#endif
int main(int argc, char **argv) {
SWMgr::debug = true;
SWMgr mymgr;
- cerr << "\n\nprefixPath: " << mymgr.prefixPath;
- cerr << "\nconfigPath: " << mymgr.configPath << "\n\n";
+ char keypress[2];
+ std::cerr << "\n\nprefixPath: " << mymgr.prefixPath;
+ std::cerr << "\nconfigPath: " << mymgr.configPath << "\n\n";
ModMap::iterator it;
for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
- cout << "[" << (*it).second->Name() << "] (Writable: " << (it->second->isWritable()?"Yes":"No") << ") [" << (*it).second->Description() << "]\n";
- cout << "AbsoluteDataPath = " << it->second->getConfigEntry("AbsoluteDataPath") << "\n";
- cout << "Has Feature HebrewDef = " << it->second->getConfig().has("Feature", "HebrewDef") << "\n";
+ std::cout << "[" << (*it).second->Name() << "] (Writable: " << (it->second->isWritable()?"Yes":"No") << ") [" << (*it).second->Description() << "]\n";
+ std::cout << "AbsoluteDataPath = " << it->second->getConfigEntry("AbsoluteDataPath") << "\n";
+ std::cout << "Has Feature HebrewDef = " << it->second->getConfig().has("Feature", "HebrewDef") << "\n";
if ((!strcmp((*it).second->Type(), "Biblical Texts")) || (!strcmp((*it).second->Type(), "Commentaries"))) {
- (*it).second->SetKey("James 1:19");
- cout << (const char *) *(*it).second << "\n\n";
+ it->second->setKey("James 1:19");
+ std::cout << (const char *) *(*it).second << "\n\n";
}
}
SWModule *mhc = mymgr.Modules["MHC"];
if (mhc) {
for (mhc->Key("Gen 1:1"); mhc->Key() < (VerseKey) "Gen 1:10"; (*mhc)++)
- cout << (const char *) *mhc << "\n";
+ std::cout << (const char *) *mhc << "\n";
}
return 0;
}