|
| 1 | +#include <imageformats/stub/imageformatstub.h> |
| 2 | + |
| 3 | +#include "../common.h" |
| 4 | + |
| 5 | +using namespace libscratchcpp; |
| 6 | + |
| 7 | +TEST(ImageFormatStubTest, Width) |
| 8 | +{ |
| 9 | + ImageFormatStub img; |
| 10 | + ASSERT_EQ(img.width(), 0); |
| 11 | +} |
| 12 | + |
| 13 | +TEST(ImageFormatStubTest, Height) |
| 14 | +{ |
| 15 | + ImageFormatStub img; |
| 16 | + ASSERT_EQ(img.height(), 0); |
| 17 | +} |
| 18 | + |
| 19 | +TEST(ImageFormatStubTest, ColorAt) |
| 20 | +{ |
| 21 | + ImageFormatStub img; |
| 22 | + ASSERT_EQ(img.colorAt(0, 0, 1), 0); |
| 23 | + ASSERT_EQ(img.colorAt(0, 1, 1), 0); |
| 24 | + ASSERT_EQ(img.colorAt(0, 2, 1), 0); |
| 25 | + ASSERT_EQ(img.colorAt(1, 0, 1), 0); |
| 26 | + ASSERT_EQ(img.colorAt(1, 1, 1), 0); |
| 27 | + ASSERT_EQ(img.colorAt(1, 2, 1), 0); |
| 28 | + ASSERT_EQ(img.colorAt(2, 0, 1), 0); |
| 29 | + ASSERT_EQ(img.colorAt(2, 1, 1), 0); |
| 30 | + ASSERT_EQ(img.colorAt(2, 2, 1), 0); |
| 31 | + ASSERT_EQ(img.colorAt(2, 2, 2.5), 0); |
| 32 | +} |
0 commit comments