#include <catch2/catch.hpp>
#include <iostream>
#include <render/imageblock.h>
#include <Eigen/Dense>
using namespace std;

TEST_CASE("Image block", "[image block]")
{
    BlockedImage blocks({8, 8}, {4, 4});
    for (int i = 0; i < blocks.size(); i++)
    {
        ImageBlock block = blocks.getBlock(i);
        printf("block: %d, %d\n", block.m_blockSize[0], block.m_blockSize[1]);
        for (Array2i pixel_idx = block.curPixel(); block.hasNext(); pixel_idx = block.nextPixel())
        {
            printf("pixel: %d, %d\n", pixel_idx[0], pixel_idx[1]);
        }
        printf("block %d\n", i);
    }
}