mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-08-16 08:16:09 +00:00
Separate settings tests
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
parent
84f5f95e54
commit
d30dccc94a
@ -173,7 +173,7 @@ struct Settings {
|
||||
void setConsoleInputAccessMapping(const ComposedKey& keyName, bool value);
|
||||
};
|
||||
|
||||
TEST_CASE("settings variant functions") {
|
||||
TEST_CASE("settings get/set") {
|
||||
Settings settings;
|
||||
settings.set(Settings::General_Name, "hello, world");
|
||||
CHECK_EQ(settings.getAsString(Settings::General_Name), "hello, world");
|
||||
@ -181,7 +181,10 @@ TEST_CASE("settings variant functions") {
|
||||
CHECK_EQ(settings.getAsString(Settings::General_Name), "hello, world");
|
||||
settings.set(Settings::General_MaxPlayers, 12);
|
||||
CHECK_EQ(settings.getAsInt(Settings::General_MaxPlayers), 12);
|
||||
}
|
||||
|
||||
TEST_CASE("settings check for exception on wrong input type"){
|
||||
Settings settings;
|
||||
CHECK_THROWS(settings.set(Settings::General_Debug, "hello, world"));
|
||||
CHECK_NOTHROW(settings.set(Settings::General_Debug, false));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user