| | 94 | |
| | 95 | /// |
| | 96 | /// @brief Check setting the zoom values. |
| | 97 | /// |
| | 98 | /// Especially check that zoomToWidth() and zoomToFit() can't be |
| | 99 | /// set both to true. |
| | 100 | /// |
| | 101 | void |
| | 102 | ConfigTest::zoomValues () |
| | 103 | { |
| | 104 | Config &config = Config::getConfig (); |
| | 105 | |
| | 106 | config.setZoomToFit (TRUE); |
| | 107 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 108 | CPPUNIT_ASSERT ( config.zoomToFit () ); |
| | 109 | config.setZoomToFit (FALSE); |
| | 110 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 111 | CPPUNIT_ASSERT ( !config.zoomToFit () ); |
| | 112 | config.setZoomToWidth (TRUE); |
| | 113 | CPPUNIT_ASSERT ( config.zoomToWidth () ); |
| | 114 | CPPUNIT_ASSERT ( !config.zoomToFit () ); |
| | 115 | config.setZoomToWidth (FALSE); |
| | 116 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 117 | CPPUNIT_ASSERT ( !config.zoomToFit () ); |
| | 118 | config.setZoomToFit (TRUE); |
| | 119 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 120 | CPPUNIT_ASSERT ( config.zoomToFit () ); |
| | 121 | config.setZoomToWidth (TRUE); |
| | 122 | CPPUNIT_ASSERT ( config.zoomToWidth () ); |
| | 123 | CPPUNIT_ASSERT ( !config.zoomToFit () ); |
| | 124 | config.setZoomToFit (TRUE); |
| | 125 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 126 | CPPUNIT_ASSERT ( config.zoomToFit () ); |
| | 127 | config.setZoomToFit (FALSE); |
| | 128 | CPPUNIT_ASSERT ( !config.zoomToWidth () ); |
| | 129 | CPPUNIT_ASSERT ( !config.zoomToFit () ); |
| | 130 | } |