first successful print of gibberish

This commit is contained in:
2023-09-24 11:49:57 +02:00
parent 29a609e855
commit 7905f37150
5 changed files with 71 additions and 36 deletions

View File

@@ -48,19 +48,19 @@ TEST(basic_test, Bitmap_getBitmapLineInsideOfImage_yieldsValidLineSize) {
ASSERT_EQ(16, lineSize);
}
TEST(basic_test, Bitmap_getBitmapRowOutsideOfImage_yieldsNullopt) {
TEST(basic_test, Bitmap_getBitmapColOutsideOfImage_yieldsNullopt) {
auto bm = ptprnt::graphics::Bitmap<ptprnt::graphics::ALPHA8>(16, 8);
// row 16 is out of bounds, count begins with 0
auto outOfBoundsRow = bm.getRow(16);
ASSERT_EQ(std::nullopt, outOfBoundsRow);
// col 16 is out of bounds, count begins with 0
auto outOfBoundsCol = bm.getCol(16);
ASSERT_EQ(std::nullopt, outOfBoundsCol);
}
TEST(basic_test, Bitmap_getBitmapRowInsideOfImage_yieldsValidRowSize) {
TEST(basic_test, Bitmap_getBitmapColInsideOfImage_yieldsValidColSize) {
auto bm = ptprnt::graphics::Bitmap<ptprnt::graphics::ALPHA8>(16, 8);
auto row = bm.getRow(15);
if (!row) {
FAIL() << "Returned Row is invalid";
auto col = bm.getCol(15);
if (!col) {
FAIL() << "Returned Col is invalid";
}
auto rowSize = row->size();
ASSERT_EQ(8, rowSize);
auto colSize = col->size();
ASSERT_EQ(8, colSize);
}