// Sesión 1: pruebas del módulo de imágenes.
// Agreguen sus casos: image_new, image_free con NULL, y lo que debe fallar.
#include <assert.h>
#include <stdio.h>

#include "image.h"

static void test_load_tiny(void) {
    const int expected[] = {0, 10, 20,
                            30, 40, 50};
    struct image *wanted = image_from_values(3, 2, 255, expected);
    struct image *img = image_load("lab/images/tiny.pgm");
    assert(wanted != NULL);
    assert(img != NULL);
    assert(image_equal(img, wanted));
    image_free(img);
    image_free(wanted);
}

int main(void) {
    test_load_tiny();

    printf("Todas las pruebas pasaron\n");
    return 0;
}
