aboutsummaryrefslogtreecommitdiff
path: root/src/test/testLibbible.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/testLibbible.cc')
-rw-r--r--src/test/testLibbible.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/testLibbible.cc b/src/test/testLibbible.cc
index 0f65e6d..a4fbc32 100644
--- a/src/test/testLibbible.cc
+++ b/src/test/testLibbible.cc
@@ -26,6 +26,7 @@ class TestLibbible : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE(TestLibbible);
CPPUNIT_TEST(testGetModules);
+ CPPUNIT_TEST(testGetBooks);
CPPUNIT_TEST(testGetPassages);
CPPUNIT_TEST(testGetText);
CPPUNIT_TEST(testSettings);
@@ -39,6 +40,7 @@ class TestLibbible : public CppUnit::TestFixture
protected:
void testGetModules(void);
+ void testGetBooks(void);
void testGetPassages(void);
void testGetText(void);
void testSettings(void);
@@ -91,6 +93,16 @@ void TestLibbible::testGetModules(void) {
CPPUNIT_ASSERT(mods["JPS"].size() == 39);
}
+void TestLibbible::testGetBooks(void) {
+ vector<string> mods = libbible::getModuleNames();
+ vector<string> kjvbooks = libbible::getBooks("KJV");
+ CPPUNIT_ASSERT(kjvbooks.size() == 66);
+ CPPUNIT_ASSERT(kjvbooks[7] == "Ruth");
+ CPPUNIT_ASSERT(kjvbooks[42] == "John");
+ vector<string> jpsbooks = libbible::getBooks("JPS");
+ CPPUNIT_ASSERT(jpsbooks.size() == 39);
+}
+
void TestLibbible::testGetPassages(void) {
auto passages = libbible::getPassages("KJV", "Romans");
CPPUNIT_ASSERT(passages[0].modName == "KJV");