From ddc05ee8fa60ec240d09d1d71a08f9521a1bd8b2 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 18 Apr 2022 12:02:48 -0400 Subject: Speed gains when working with multiple modules --- src/test/testLibbible.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/test/testLibbible.cc') 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 mods = libbible::getModuleNames(); + vector kjvbooks = libbible::getBooks("KJV"); + CPPUNIT_ASSERT(kjvbooks.size() == 66); + CPPUNIT_ASSERT(kjvbooks[7] == "Ruth"); + CPPUNIT_ASSERT(kjvbooks[42] == "John"); + vector 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"); -- cgit v1.2.3