raycaster/tests/palette.cpp
2025-07-16 12:46:49 -04:00

20 lines
458 B
C++

#include <catch2/catch_test_macros.hpp>
#include <fmt/core.h>
#include <string>
#include "palette.hpp"
using namespace fmt;
TEST_CASE("color palette test", "[color-palette]") {
palette::init();
sf::Color expect{10, 10, 10, 255};
auto gui_text = palette::get("gui/text:dark");
REQUIRE(gui_text == expect);
gui_text = palette::get("gui/text:mid");
REQUIRE(gui_text != expect);
expect = {100, 100, 100, 255};
REQUIRE(gui_text == expect);
}