mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
17 lines
328 B
C++
17 lines
328 B
C++
|
/*
|
||
|
* Copyright (c) 2024, Lucas Chollet <lucas.chollet@serenityos.org>
|
||
|
*
|
||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||
|
*/
|
||
|
|
||
|
#include <LibGfx/Color.h>
|
||
|
#include <LibTest/TestCase.h>
|
||
|
|
||
|
TEST_CASE(color)
|
||
|
{
|
||
|
for (u16 i = 0; i < 256; ++i) {
|
||
|
auto const gray = Color(i, i, i);
|
||
|
EXPECT_EQ(gray, gray.to_grayscale());
|
||
|
}
|
||
|
}
|