Changeset 205
- Timestamp:
- 06/10/06 05:34:50 (2 years ago)
- Location:
- trunk/tests
- Files:
-
- 6 modified
-
ConfigTest.cxx (modified) (6 diffs)
-
ConfigTest.h (modified) (2 diffs)
-
DumbDocument.cxx (modified) (1 diff)
-
DumbDocument.h (modified) (1 diff)
-
DumbMainView.cxx (modified) (7 diffs)
-
DumbMainView.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/ConfigTest.cxx
r193 r205 60 60 CPPUNIT_ASSERT (config.showStatusbar ()); 61 61 CPPUNIT_ASSERT_EQUAL ((gchar *)NULL, config.getOpenFileFolder ()); 62 CPPUNIT_ASSERT_EQUAL ((gchar *)NULL, config.getSaveFileFolder ()); 62 63 CPPUNIT_ASSERT (!config.zoomToWidth ()); 63 64 CPPUNIT_ASSERT (!config.zoomToFit ()); … … 78 79 config.setWindowPos (30, 40); 79 80 config.setWindowSize (100, 90); 80 81 81 82 CPPUNIT_ASSERT_EQUAL (30, config.getWindowX ()); 82 83 CPPUNIT_ASSERT_EQUAL (40, config.getWindowY ()); … … 100 101 101 102 /// 102 /// @brief Checks setting the value for showing the status bar.103 /// @brief Checks setting the value for showing the status bar. 103 104 /// 104 105 void … … 117 118 /// 118 119 void 119 ConfigTest:: currentFolder ()120 ConfigTest::openCurrentFolder () 120 121 { 121 122 Config &config = Config::getConfig (); … … 123 124 config.setOpenFileFolder ("/tmp"); 124 125 gchar *openFolder = config.getOpenFileFolder (); 125 CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("/tmp", openFolder));126 CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("/tmp", openFolder)); 126 127 g_free (openFolder); 128 } 129 130 /// 131 /// @brief Check setting the current folder for saving files. 132 /// 133 void 134 ConfigTest::saveCurrentFolder () 135 { 136 Config &config = Config::getConfig (); 137 138 config.setSaveFileFolder ("/home"); 139 gchar *saveFolder = config.getSaveFileFolder (); 140 CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("/home", saveFolder)); 141 g_free (saveFolder); 127 142 } 128 143 … … 171 186 { 172 187 Config &config = Config::getConfig (); 173 188 174 189 config.setExternalBrowserCommandLine ("galeon %s"); 175 190 gchar *commandLine = config.getExternalBrowserCommandLine (); 176 191 CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("galeon %s", commandLine)); 177 192 g_free (commandLine); 178 193 179 194 config.setExternalBrowserCommandLine ("xterm -e lynx %s"); 180 195 commandLine = config.getExternalBrowserCommandLine (); -
trunk/tests/ConfigTest.h
r193 r205 30 30 CPPUNIT_TEST (showToolbar); 31 31 CPPUNIT_TEST (showStatusbar); 32 CPPUNIT_TEST (currentFolder); 32 CPPUNIT_TEST (openCurrentFolder); 33 CPPUNIT_TEST (saveCurrentFolder); 33 34 CPPUNIT_TEST (zoomValues); 34 35 CPPUNIT_TEST (externalBrowser); … … 43 44 void showToolbar (void); 44 45 void showStatusbar (void); 45 void currentFolder (void); 46 void openCurrentFolder (void); 47 void saveCurrentFolder (void); 46 48 void zoomValues (void); 47 49 void externalBrowser (void); -
trunk/tests/DumbDocument.cxx
r158 r205 100 100 } 101 101 102 gboolean 103 DumbDocument::saveFile (const gchar *filename, GError **error) 104 { 105 // Do nothing. 106 return TRUE; 107 } 108 102 109 //////////////////////////////////////////////////////////////// 103 110 // Tests Methods -
trunk/tests/DumbDocument.h
r158 r205 35 35 gdouble *height); 36 36 DocumentPage *renderPage (gint pageNum); 37 gboolean saveFile (const gchar *filename, GError **error); 37 38 38 39 // Test functions. -
trunk/tests/DumbMainView.cxx
r177 r205 73 73 g_free (m_Title); 74 74 } 75 76 void 75 76 void 77 77 DumbMainView::activeZoomFit (gboolean active) 78 78 { … … 80 80 } 81 81 82 void 82 void 83 83 DumbMainView::activeZoomWidth (gboolean active) 84 84 { … … 97 97 return m_PageView; 98 98 } 99 99 100 IPreferencesView * 101 DumbMainView::getPreferencesView () 102 { 103 return (IPreferencesView *)0; 104 } 105 100 106 gchar * 101 107 DumbMainView::openFileDialog (const gchar *lastFolder) … … 113 119 } 114 120 121 gchar * 122 DumbMainView::saveFileDialog (const gchar *lastFolder) 123 { 124 // Do nothing. 125 return g_strdup (""); 126 } 127 115 128 void 116 129 DumbMainView::sensitiveGoToFirstPage (gboolean sensitive) … … 166 179 } 167 180 168 void 181 void 169 182 DumbMainView::sensitiveRotateRight (gboolean sensitive) 170 183 { 171 184 m_SensitiveRotateRight = sensitive; 185 } 186 187 void 188 DumbMainView::sensitiveSave (gboolean sensitive) 189 { 190 } 191 192 void 193 DumbMainView::sensitiveZoom (gboolean sensitive) 194 { 172 195 } 173 196 … … 200 223 { 201 224 return (const gchar *)m_GoToPageText; 225 } 226 227 const gchar * 228 DumbMainView::getZoomText () 229 { 230 return ""; 202 231 } 203 232 … … 236 265 void 237 266 DumbMainView::setStatusBarText (const gchar *text) 267 { 268 } 269 270 void 271 DumbMainView::setZoomText (const gchar *text) 238 272 { 239 273 } -
trunk/tests/DumbMainView.h
r173 r205 36 36 IFindView *getFindView (void); 37 37 IPageView *getPageView (void); 38 IPreferencesView *getPreferencesView (void); 39 const gchar *getZoomText (void); 38 40 gchar *openFileDialog (const gchar *lastFolder); 39 41 gchar *promptPasswordDialog (void); 42 char *saveFileDialog (const gchar *lastFolder); 40 43 void sensitiveFind (gboolean sensitive); 41 44 void sensitiveGoToFirstPage (gboolean sensitive); … … 48 51 void sensitiveRotateLeft (gboolean sensitive); 49 52 void sensitiveRotateRight (gboolean sensitive); 53 void sensitiveSave (gboolean sensitive); 54 void sensitiveZoom (gboolean sensitive); 50 55 void sensitiveZoomIn (gboolean sensitive); 51 56 void sensitiveZoomOut (gboolean sensitive); … … 55 60 void setCursor (ViewCursor cursorType); 56 61 void setTotalPages (gint pages); 57 void setGoToPageText (const char *text); 62 void setGoToPageText (const char *text); 58 63 void setTitle (const gchar *title); 59 64 void setOutline (DocumentOutline *outline); 60 65 void setStatusBarText (const gchar *text); 66 void setZoomText (const gchar *text); 61 67 void show (void); 62 68 void showErrorMessage (const gchar *title, const gchar *body);
