diff options
author | Your Name <you@example.com> | 2022-04-18 12:02:48 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2022-04-18 12:02:48 -0400 |
commit | ddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2 (patch) | |
tree | c54d4ffa92cb171ba23a81b2d9d4c6b5e3b41dd4 /src/test | |
parent | f843d4e1af82ac7485e8e9428e7411d88d39450e (diff) | |
download | libbible-ddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2.tar.gz libbible-ddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2.tar.bz2 libbible-ddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2.zip |
Speed gains when working with multiple modulesv1.0.4
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/testLibbible.cc | 12 |
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"); |