From edf4378c442a24c8f35959a52a1d3e9894e0b6a0 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Oct 2020 18:29:54 +0100 Subject: Fix own previous commit re testing of `BLI_rel_path`. Windows would need its own version of those tests, for now just disabling them on that platform. --- source/blender/blenlib/tests/BLI_path_util_test.cc | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/source/blender/blenlib/tests/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc index 5ec057a8501..927d24d2c4c 100644 --- a/source/blender/blenlib/tests/BLI_path_util_test.cc +++ b/source/blender/blenlib/tests/BLI_path_util_test.cc @@ -602,15 +602,16 @@ TEST(path_util, PathExtension) } /* BLI_path_rel. */ +#ifndef _WIN32 -#define PATH_REL(abs_path, ref_path, rel_path) \ - { \ - char path[FILE_MAX]; \ - BLI_strncpy(path, abs_path, sizeof(path)); \ - BLI_path_rel(path, ref_path); \ - EXPECT_STREQ(rel_path, path); \ - } \ - void(0) +# define PATH_REL(abs_path, ref_path, rel_path) \ + { \ + char path[FILE_MAX]; \ + BLI_strncpy(path, abs_path, sizeof(path)); \ + BLI_path_rel(path, ref_path); \ + EXPECT_STREQ(rel_path, path); \ + } \ + void(0) TEST(path_util, PathRelPath) { @@ -650,3 +651,7 @@ TEST(path_util, PathRelPath) PATH_REL(abs_path_in, ref_path_in, abs_path_out); } } + +# undef PATH_REL + +#endif -- cgit v1.2.3