Show
Ignore:
Timestamp:
04/11/06 14:16:02 (3 years ago)
Author:
jordi
Message:

The main presenter now can rotate as well.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/MainPterTest.cxx

    r29 r30  
    412412    CPPUNIT_ASSERT (!m_View->hasImagePageView ()); 
    413413} 
     414 
     415/// 
     416/// @brief Test the rotation of the page. 
     417/// 
     418/// This is a very simple test about page rotation. 
     419/// 
     420void 
     421MainPterTest::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}