Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/tests/test_Color.h
/* Copyright (C) 2022 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 9 Lines | |||||
#include "graphics/Color.h" | #include "graphics/Color.h" | ||||
#include <cstring> | #include <cstring> | ||||
class TestColor : public CxxTest::TestSuite | class TestColor : public CxxTest::TestSuite | ||||
{ | { | ||||
public: | public: | ||||
void setUp() | |||||
{ | |||||
ColorActivateFastImpl(); | |||||
} | |||||
void test_Color4ub() | void test_Color4ub() | ||||
{ | { | ||||
CheckColor(0, 0, 0, 0x000000); | CheckColor(0, 0, 0, 0x000000); | ||||
CheckColor(1, 0, 0, 0x0000ff); | CheckColor(1, 0, 0, 0x0000ff); | ||||
CheckColor(0, 1, 0, 0x00ff00); | CheckColor(0, 1, 0, 0x00ff00); | ||||
CheckColor(0, 0, 1, 0xff0000); | CheckColor(0, 0, 1, 0xff0000); | ||||
CheckColor(1, 1, 1, 0xffffff); | CheckColor(1, 1, 1, 0xffffff); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator