From 536a34cd59258d3a75d4caa8431fc688b1e788f6 Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 2 Jun 2021 11:31:38 +0200 Subject: Prettify test cases --- svg-flatten/src/nopencv_test.cpp | 74 ++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 44 deletions(-) (limited to 'svg-flatten/src/nopencv_test.cpp') diff --git a/svg-flatten/src/nopencv_test.cpp b/svg-flatten/src/nopencv_test.cpp index 389de60..902aa18 100644 --- a/svg-flatten/src/nopencv_test.cpp +++ b/svg-flatten/src/nopencv_test.cpp @@ -10,7 +10,6 @@ #include #include -#define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" using namespace gerbolyze; @@ -180,42 +179,35 @@ int render_svg(const char *in_svg, const char *out_png) { } static void testdata_roundtrip(const char *fn) { - int x, y; - uint8_t *data = stbi_load(fn, &x, &y, nullptr, 1); - Image32 ref_img(x, y); - for (int cy=0; cy 0.5) { snprintf(msg, sizeof(msg), "%s: Chain approximation RMS error is above threshold: %.3f > 0.5\n", fn, rms_sum); mu_fail(msg); -- cgit