Tyro/tests/ThemeConfigTest.cpp
2015-07-07 10:01:17 -04:00

29 lines
565 B
C++

#include "tests/catch.hpp"
#include "src/settings/ThemeConfig.h"
TEST_CASE("Theme Config Library")
{
ThemeConfig *config = new ThemeConfig();
SECTION("GetTheme()")
{
JsonValue theme = config->GetTheme();
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);
}
}