summaryrefslogtreecommitdiff
path: root/tests.c
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 23:55:57 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-01-22 23:55:57 +0100
commit91ab3ae0147712b549e4ec086818f847fd23e12f (patch)
tree7b2dae9f288e1f7c6b3dc7c0101b4651fd0cf85d /tests.c
parent3c62d3d54244731b641952bd7e93edbab16d5d79 (diff)
downloadnonstd-91ab3ae0147712b549e4ec086818f847fd23e12f.tar.gz
Add PPM simple image implementation
Diffstat (limited to 'tests.c')
-rw-r--r--tests.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests.c b/tests.c
index bca3a89..d9c5954 100644
--- a/tests.c
+++ b/tests.c
@@ -974,20 +974,20 @@ MU_TEST(test_ppm_draw_helpers) {
Canvas img = ppm_init(100, 100);
// Test fill
- ppm_fill(&img, CLR_RED);
+ ppm_fill(&img, COLOR_RED);
Color c1 = ppm_get_pixel(&img, 0, 0);
mu_assert_int_eq(255, c1.r);
mu_assert_int_eq(0, c1.g);
// Test rect
- ppm_fill(&img, CLR_BLACK);
- ppm_draw_rect(&img, 10, 10, 20, 20, CLR_WHITE);
+ ppm_fill(&img, COLOR_BLACK);
+ ppm_draw_rect(&img, 10, 10, 20, 20, COLOR_WHITE);
mu_assert_int_eq(255, ppm_get_pixel(&img, 10, 10).r);
mu_assert_int_eq(0, ppm_get_pixel(&img, 15, 15).r); // Inside should be black
// Test line
- ppm_fill(&img, CLR_BLACK);
- ppm_draw_line(&img, 0, 0, 10, 10, CLR_GREEN);
+ ppm_fill(&img, COLOR_BLACK);
+ ppm_draw_line(&img, 0, 0, 10, 10, COLOR_GREEN);
mu_assert_int_eq(255, ppm_get_pixel(&img, 5, 5).g);
// Test hexagon/color macros