#include "pw_unit_test/framework.h"
#include "samples/risp4ml/common/image.h"
#include "samples/risp4ml/common/test_utils.h"

class ImageTest : public ::testing::Test {
 protected:
  void SetUp() override {
    img_ = image_new(3, 32, 64);
    FillImage(img_);
  }
  void TearDown() override { image_delete(img_); }

  Image* img_;
};

TEST_F(ImageTest, PixelAccess) {
  for (uint16_t c = 0; c < img_->num_channels; ++c) {
    for (uint16_t y = 0; y < img_->height; ++y) {
      for (uint16_t x = 0; x < img_->width; ++x) {
        ASSERT_EQ(image_pixel_val(img_, c, y, x), Pattern(c, y, x));
      }
    }
  }
}

TEST_F(ImageTest, RowAccess) {
  pixel_type_t* row_4 = image_row(img_, 1, 4);
  for (uint16_t i = 0; i < 16; ++i) {
    ASSERT_EQ(row_4[i], Pattern(1, 4, i));
  }
}
