| | 60 | |
| | 61 | /// |
| | 62 | /// @brief Test a file without outline. |
| | 63 | /// |
| | 64 | /// When a loaded document doesn't have an outline, the DocumentOutline's |
| | 65 | /// behaviour is exactly the same as the initial status. |
| | 66 | /// |
| | 67 | void |
| | 68 | DocumentOutlineTest::noOutline () |
| | 69 | { |
| | 70 | CPPUNIT_ASSERT (m_Document->loadFile (TEST_DATA_DIR "test2.pdf", |
| | 71 | NULL, NULL)); |
| | 72 | CPPUNIT_ASSERT (m_Document->isLoaded ()); |
| | 73 | DocumentOutline *outline = m_Document->getOutline (); |
| | 74 | CPPUNIT_ASSERT_EQUAL (0, outline->getNumChildren ()); |
| | 75 | CPPUNIT_ASSERT (0 == g_ascii_strcasecmp ("", outline->getTitle ())); |
| | 76 | CPPUNIT_ASSERT_EQUAL (1, outline->getDestinationPage ()); |
| | 77 | CPPUNIT_ASSERT (NULL == outline->getFirstChild ()); |
| | 78 | } |