Changeset 59
- Timestamp:
- 04/14/06 10:17:56 (2 years ago)
- Location:
- trunk/tests
- Files:
-
- 2 modified
-
DocumentOutlineTest.cxx (modified) (2 diffs)
-
DocumentOutlineTest.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/DocumentOutlineTest.cxx
r58 r59 51 51 { 52 52 CPPUNIT_ASSERT ( !m_Document->isLoaded ()); 53 DocumentOutline *outline = m_Document->getOutline ();53 DocumentOutline *outline = m_Document->getOutline (); 54 54 // The initial state of the outline is no outline at all. 55 55 CPPUNIT_ASSERT_EQUAL (0, outline->getNumChildren ()); … … 58 58 CPPUNIT_ASSERT (NULL == outline->getFirstChild ()); 59 59 } 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 } -
trunk/tests/DocumentOutlineTest.h
r58 r59 27 27 CPPUNIT_TEST_SUITE (DocumentOutlineTest); 28 28 CPPUNIT_TEST (initialStatus); 29 CPPUNIT_TEST (noOutline); 29 30 CPPUNIT_TEST_SUITE_END (); 30 31 … … 34 35 35 36 void initialStatus (void); 37 void noOutline (void); 36 38 37 39 protected:
