Rename SNESPalette, SNESColor to SnesPalette, SnesColor
Create snes_color.h and snes_color.cc to separate concerns
This commit is contained in:
@@ -34,6 +34,7 @@ add_executable(
|
||||
../src/app/editor/context/gfx_context.cc
|
||||
../src/app/gfx/bitmap.cc
|
||||
../src/app/gfx/snes_tile.cc
|
||||
../src/app/gfx/snes_color.cc
|
||||
../src/app/gfx/snes_palette.cc
|
||||
../src/app/gfx/compression.cc
|
||||
../src/app/core/common.cc
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "app/gfx/snes_color.h"
|
||||
|
||||
namespace yaze_test {
|
||||
namespace gfx_test {
|
||||
|
||||
@@ -12,7 +14,7 @@ using yaze::app::gfx::ConvertSNEStoRGB;
|
||||
using yaze::app::gfx::Extract;
|
||||
using yaze::app::gfx::snes_color;
|
||||
using yaze::app::gfx::snes_palette;
|
||||
using yaze::app::gfx::SNESPalette;
|
||||
using yaze::app::gfx::SnesPalette;
|
||||
|
||||
namespace {
|
||||
unsigned int test_convert(yaze::app::gfx::snes_color col) {
|
||||
@@ -25,15 +27,15 @@ unsigned int test_convert(yaze::app::gfx::snes_color col) {
|
||||
} // namespace
|
||||
|
||||
TEST(SNESPaletteTest, AddColor) {
|
||||
yaze::app::gfx::SNESPalette palette;
|
||||
yaze::app::gfx::SNESColor color;
|
||||
yaze::app::gfx::SnesPalette palette;
|
||||
yaze::app::gfx::SnesColor color;
|
||||
palette.AddColor(color);
|
||||
ASSERT_EQ(palette.size(), 1);
|
||||
}
|
||||
|
||||
TEST(SNESPaletteTest, GetColorOutOfBounds) {
|
||||
yaze::app::gfx::SNESPalette palette;
|
||||
std::vector<yaze::app::gfx::SNESColor> colors(5);
|
||||
yaze::app::gfx::SnesPalette palette;
|
||||
std::vector<yaze::app::gfx::SnesColor> colors(5);
|
||||
palette.Create(colors);
|
||||
|
||||
// TODO: Fix this test, behavior has changed since the original
|
||||
|
||||
Reference in New Issue
Block a user