Show
Ignore:
Timestamp:
06/10/06 05:34:50 (2 years ago)
Author:
jordi
Message:

I've added the missing pure virtual function from last week and also added a new test function for the Config class to test the last saved folder option.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/ConfigTest.cxx

    r193 r205  
    6060    CPPUNIT_ASSERT (config.showStatusbar ()); 
    6161    CPPUNIT_ASSERT_EQUAL ((gchar *)NULL, config.getOpenFileFolder ()); 
     62    CPPUNIT_ASSERT_EQUAL ((gchar *)NULL, config.getSaveFileFolder ()); 
    6263    CPPUNIT_ASSERT (!config.zoomToWidth ()); 
    6364    CPPUNIT_ASSERT (!config.zoomToFit ()); 
     
    7879    config.setWindowPos (30, 40); 
    7980    config.setWindowSize (100, 90); 
    80      
     81 
    8182    CPPUNIT_ASSERT_EQUAL (30, config.getWindowX ()); 
    8283    CPPUNIT_ASSERT_EQUAL (40, config.getWindowY ()); 
     
    100101 
    101102/// 
    102 /// @brief Checks setting the value for showing the statusbar. 
     103/// @brief Checks setting the value for showing the status bar. 
    103104/// 
    104105void 
     
    117118/// 
    118119void 
    119 ConfigTest::currentFolder () 
     120ConfigTest::openCurrentFolder () 
    120121{ 
    121122    Config &config = Config::getConfig (); 
     
    123124    config.setOpenFileFolder ("/tmp"); 
    124125    gchar *openFolder = config.getOpenFileFolder (); 
    125     CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp("/tmp", openFolder)); 
     126    CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("/tmp", openFolder)); 
    126127    g_free (openFolder); 
     128} 
     129 
     130/// 
     131/// @brief Check setting the current folder for saving files. 
     132/// 
     133void 
     134ConfigTest::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); 
    127142} 
    128143 
     
    171186{ 
    172187    Config &config = Config::getConfig (); 
    173     
     188 
    174189    config.setExternalBrowserCommandLine ("galeon %s"); 
    175190    gchar *commandLine = config.getExternalBrowserCommandLine (); 
    176191    CPPUNIT_ASSERT ( 0 == g_ascii_strcasecmp ("galeon %s", commandLine)); 
    177192    g_free (commandLine); 
    178      
     193 
    179194    config.setExternalBrowserCommandLine ("xterm -e lynx %s"); 
    180195    commandLine = config.getExternalBrowserCommandLine ();