2015-07-07 10:01:17 -04:00
|
|
|
#include "tests/catch.hpp"
|
|
|
|
#include "src/settings/ThemeConfig.h"
|
2015-06-19 16:37:24 -04:00
|
|
|
|
|
|
|
TEST_CASE("Theme Config Library")
|
|
|
|
{
|
|
|
|
ThemeConfig *config = new ThemeConfig();
|
|
|
|
|
|
|
|
SECTION("GetTheme()")
|
|
|
|
{
|
2019-06-24 16:08:22 -04:00
|
|
|
Json::Value theme = config->GetTheme();
|
2015-06-19 16:37:24 -04:00
|
|
|
REQUIRE(theme.isObject());
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("SetTheme()")
|
|
|
|
{
|
|
|
|
REQUIRE_FALSE(config->SetTheme("foobar"));
|
|
|
|
REQUIRE(config->SetTheme("Solarized"));
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("GetThemeColor()")
|
|
|
|
{
|
|
|
|
REQUIRE(config->SetTheme("Solarized"));
|
|
|
|
|
|
|
|
// Bad color
|
|
|
|
wxColor theme_color = config->GetThemeColor("foo", "bar");
|
|
|
|
REQUIRE(wxColor("BLACK") == theme_color);
|
|
|
|
}
|
|
|
|
}
|