summaryrefslogtreecommitdiff
path: root/tests/modtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modtest.cpp')
-rw-r--r--tests/modtest.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/modtest.cpp b/tests/modtest.cpp
new file mode 100644
index 0000000..8ad1132
--- /dev/null
+++ b/tests/modtest.cpp
@@ -0,0 +1,28 @@
+#include <swmgr.h>
+#include <swtext.h>
+#include <iostream.h>
+
+int main(int argc, char **argv) {
+ SWMgr mymgr;
+ ModMap::iterator it;
+ SWModule *module;
+
+ for (it = mymgr.Modules.begin(); it != mymgr.Modules.end(); it++) {
+ module = it->second;
+ if (!strcmp(module->Type(), "Biblical Texts")) {
+ cout << module->Name() << "\n";
+ for (*module = TOP; (!module->Key().Error()); ((VerseKey *)&module->Key())->Book(((VerseKey *)&module->Key())->Book()+1)) {
+ cout << module->KeyText() << "\n";
+ }
+ }
+
+ if (!strcmp(module->Type(), "Commentaries")) {
+ cout << module->Name() << "\n";
+ for (*module = TOP; (!module->Error()); (*module)--) {
+ cout << module->KeyText() << "\n";
+ }
+
+ }
+ }
+ return 0;
+}