summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/SettingsHandlerTest.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-05-05 22:35:23 +0200
committerGitHub <noreply@github.com>2024-05-05 22:35:23 +0200
commit2c913674295e08bca0e2cb1726b778fb61bf6bd1 (patch)
tree059c4b482124ea20f5eaadfc7df39a529dcb2b72 /Source/UnitTests/Common/SettingsHandlerTest.cpp
parent485bdba98ec215efe184f9f74f73f43984d2660e (diff)
parent36cdb4a544341e45155ff750c5f67ece71348a52 (diff)
Merge pull request #12737 from nlebeck/settingshandler-split
Eliminate SettingsHandler's `SetBytes` and `Reset` methods
Diffstat (limited to 'Source/UnitTests/Common/SettingsHandlerTest.cpp')
-rw-r--r--Source/UnitTests/Common/SettingsHandlerTest.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/Source/UnitTests/Common/SettingsHandlerTest.cpp b/Source/UnitTests/Common/SettingsHandlerTest.cpp
index e482531bfe..f480c0636e 100644
--- a/Source/UnitTests/Common/SettingsHandlerTest.cpp
+++ b/Source/UnitTests/Common/SettingsHandlerTest.cpp
@@ -75,35 +75,11 @@ TEST(SettingsHandlerTest, DecryptMultipleSettings)
EXPECT_EQ(handler.GetValue("foo"), "bar");
}
-TEST(SettingsHandlerTest, SetBytesOverwritesExistingBuffer)
-{
- Common::SettingsHandler handler(BUFFER_A);
- ASSERT_EQ(handler.GetValue("key"), "val");
- ASSERT_EQ(handler.GetValue("foo"), "");
-
- handler.SetBytes(BUFFER_B);
- EXPECT_EQ(handler.GetValue("foo"), "bar");
- EXPECT_EQ(handler.GetValue("key"), "");
-}
-
TEST(SettingsHandlerTest, GetValueOnSameInstance)
{
Common::SettingsHandler handler;
handler.AddSetting("key", "val");
EXPECT_EQ(handler.GetValue("key"), "");
-
- Common::SettingsHandler::Buffer buffer = handler.GetBytes();
- handler.SetBytes(buffer);
- EXPECT_EQ(handler.GetValue("key"), "val");
-}
-
-TEST(SettingsHandlerTest, GetValueAfterReset)
-{
- Common::SettingsHandler handler(BUFFER_A);
- ASSERT_EQ(handler.GetValue("key"), "val");
-
- handler.Reset();
- EXPECT_EQ(handler.GetValue("key"), "");
}
TEST(SettingsHandlerTest, EncryptAddsLFOnNullChar)