#include "../../include/dv-processing/core/event_color.hpp"

#include "boost/ut.hpp"

int main() {
	using namespace boost::ut;

	"default_mono"_test = [] {
		dv::Event red(0, 0, 0, true);
		dv::Event green1(0, 0, 1, true);
		dv::Event green2(0, 1, 0, true);
		dv::Event blue(0, 1, 1, true);

		expect(eq(dv::colorForEvent(red), dv::EventColor::WHITE));
		expect(eq(dv::colorForEvent(green1), dv::EventColor::WHITE));
		expect(eq(dv::colorForEvent(blue), dv::EventColor::WHITE));
		expect(eq(dv::colorForEvent(green2), dv::EventColor::WHITE));
	};

	"basic_colors"_test = [] {
		dv::Event red(0, 0, 0, true);
		dv::Event green1(0, 1, 0, true);
		dv::Event green2(0, 0, 1, true);
		dv::Event blue(0, 1, 1, true);

		expect(eq(dv::colorForEvent(red, dv::PixelArrangement::RGBG), dv::EventColor::RED));
		expect(eq(dv::colorForEvent(green1, dv::PixelArrangement::RGBG), dv::EventColor::GREEN1));
		expect(eq(dv::colorForEvent(blue, dv::PixelArrangement::RGBG), dv::EventColor::BLUE));
		expect(eq(dv::colorForEvent(green2, dv::PixelArrangement::RGBG), dv::EventColor::GREEN2));
	};

	return 0;
}
