Fix a bug in palette that kept it from being idempotent.
This commit is contained in:
parent
986b2612d4
commit
37b007d79c
5 changed files with 21 additions and 10 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "animation.hpp"
|
||||
#include "components.hpp"
|
||||
#include "ai.hpp"
|
||||
#include "palette.hpp"
|
||||
|
||||
using namespace combat;
|
||||
using namespace boss;
|
||||
|
|
@ -100,6 +101,7 @@ TEST_CASE("boss/systems.cpp works", "[combat-battle]") {
|
|||
components::init();
|
||||
sfml::Backend backend;
|
||||
guecs::init(&backend);
|
||||
|
||||
ai::reset();
|
||||
ai::init("ai");
|
||||
animation::init();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ using namespace fmt;
|
|||
|
||||
TEST_CASE("color palette test", "[color-palette]") {
|
||||
palette::init();
|
||||
REQUIRE(palette::initialized() == true);
|
||||
// confirm it's idempotent
|
||||
palette::init();
|
||||
|
||||
sf::Color expect{10, 10, 10, 255};
|
||||
|
||||
auto gui_text = palette::get("gui/theme:dark_dark");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue