| | 414 | |
| | 415 | /// |
| | 416 | /// @brief Test the rotation of the page. |
| | 417 | /// |
| | 418 | /// This is a very simple test about page rotation. |
| | 419 | /// |
| | 420 | void |
| | 421 | MainPterTest::pageRotate () |
| | 422 | { |
| | 423 | m_View->setOpenFileName ("/tmp/test.pdf"); |
| | 424 | m_MainPter->openFileActivated (); |
| | 425 | CPPUNIT_ASSERT (m_View->hasImagePageView ()); |
| | 426 | CPPUNIT_ASSERT (!m_View->hasImagePageView ()); |
| | 427 | CPPUNIT_ASSERT_EQUAL (m_Document->getRotation (), 0); |
| | 428 | |
| | 429 | m_MainPter->rotateRightActivated (); |
| | 430 | CPPUNIT_ASSERT (m_View->hasImagePageView ()); |
| | 431 | CPPUNIT_ASSERT (!m_View->hasImagePageView ()); |
| | 432 | CPPUNIT_ASSERT_EQUAL (m_Document->getRotation (), 90); |
| | 433 | |
| | 434 | m_MainPter->rotateLeftActivated (); |
| | 435 | CPPUNIT_ASSERT (m_View->hasImagePageView ()); |
| | 436 | CPPUNIT_ASSERT (!m_View->hasImagePageView ()); |
| | 437 | CPPUNIT_ASSERT_EQUAL (m_Document->getRotation (), 0); |
| | 438 | } |