aboutsummaryrefslogtreecommitdiff
path: root/src/test/testLibbible.cc
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-04-18 12:02:48 -0400
committerYour Name <you@example.com>2022-04-18 12:02:48 -0400
commitddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2 (patch)
treec54d4ffa92cb171ba23a81b2d9d4c6b5e3b41dd4 /src/test/testLibbible.cc
parentf843d4e1af82ac7485e8e9428e7411d88d39450e (diff)
downloadlibbible-69e520c82fdec0a1c6c95b563bb18fa034b74759.tar.gz (sig)
libbible-69e520c82fdec0a1c6c95b563bb18fa034b74759.tar.bz2 (sig)
libbible-69e520c82fdec0a1c6c95b563bb18fa034b74759.zip (sig)
Speed gains when working with multiple modulesv1.0.4
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");