From 4ffb4c65825ab0a5ded00ff799b494097e7bd143 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 5 Jun 2021 23:33:44 +0200 Subject: Make svg-flatten auto-search for cargo dependencies in all call sites --- svg-flatten/src/test/nopencv_test.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'svg-flatten/src/test/nopencv_test.cpp') diff --git a/svg-flatten/src/test/nopencv_test.cpp b/svg-flatten/src/test/nopencv_test.cpp index e4cc078..13be6f8 100644 --- a/svg-flatten/src/test/nopencv_test.cpp +++ b/svg-flatten/src/test/nopencv_test.cpp @@ -5,6 +5,7 @@ #include #include +#include "util.h" #include "nopencv.hpp" #include @@ -158,24 +159,8 @@ MU_TEST(test_complex_example_from_paper) { } int render_svg(const char *in_svg, const char *out_png) { - const char *command_line[] = {"resvg", in_svg, out_png, nullptr}; - struct subprocess_s subprocess; - int rc = subprocess_create(command_line, subprocess_option_inherit_environment, &subprocess); - if (rc) - return rc; - - int resvg_rc = -1; - rc = subprocess_join(&subprocess, &resvg_rc); - if (rc) - return rc; - if (resvg_rc) - return -resvg_rc; - - rc = subprocess_destroy(&subprocess); - if (rc) - return rc; - - return 0; + const char *command_line[] = {nullptr, in_svg, out_png, nullptr}; + return run_cargo_command("resvg", command_line, "RESVG"); } static void testdata_roundtrip(const char *fn) { -- cgit