Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added unit tests for the GetSettingsFile function.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 20 Mar 2016 15:25:54 +0000 (15:25 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 20 Mar 2016 15:25:54 +0000 (15:25 +0000)
source/tests/xestiaab_common.h

index 248582e..2efff91 100644 (file)
@@ -177,4 +177,30 @@ TEST(CommonFunctions, GetAccountsFile){
        
 #endif
        
+}
+
+TEST(CommonFunctions, GetSettingsFile){
+       
+       // Run the unit tests depending on the operating system being used.
+       
+#if defined(__WIN32__)
+       
+#elif defined(__APPLE__)
+       
+#else
+       
+       // Setup for comparison purposes. Should be 
+       // /home/<user>/.xestiaab/preferences/accounts
+       
+       wxString SettingsFileCheck = "";
+       SettingsFileCheck.Clear();
+       SettingsFileCheck.Append(wxString::FromUTF8(getenv("HOME")));
+       SettingsFileCheck.Append(wxT("/.xestiaab/preferences/settings"));
+       
+       wxString SettingsFile = GetSettingsFile();
+       
+       ASSERT_EQ(SettingsFile, SettingsFileCheck);
+       
+#endif
+       
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy