From: Steve Brokenshire Date: Sun, 20 Mar 2016 15:25:54 +0000 (+0000) Subject: Added unit tests for the GetSettingsFile function. X-Git-Tag: release-0.11~24 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=7f79ec2c095cc3ab182ad2e3841ae6b1a960b33b Added unit tests for the GetSettingsFile function. --- diff --git a/source/tests/xestiaab_common.h b/source/tests/xestiaab_common.h index 248582e..2efff91 100644 --- a/source/tests/xestiaab_common.h +++ b/source/tests/xestiaab_common.h @@ -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//.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