[Bf-blender-cvs] [670ee877d9a] blender-v2.83-release: Fix own previous commit re testing of `BLI_rel_path`.
Bastien Montagne
noreply at git.blender.org
Tue Nov 10 15:33:44 CET 2020
Commit: 670ee877d9ae90e775486edea30beaa968cf125b
Author: Bastien Montagne
Date: Mon Oct 26 18:29:54 2020 +0100
Branches: blender-v2.83-release
https://developer.blender.org/rB670ee877d9ae90e775486edea30beaa968cf125b
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.
===================================================================
M tests/gtests/blenlib/BLI_path_util_test.cc
===================================================================
diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/tests/gtests/blenlib/BLI_path_util_test.cc
index edc2b1189fe..32f2ce18780 100644
--- a/tests/gtests/blenlib/BLI_path_util_test.cc
+++ b/tests/gtests/blenlib/BLI_path_util_test.cc
@@ -635,15 +635,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)
{
@@ -683,3 +684,7 @@ TEST(path_util, PathRelPath)
PATH_REL(abs_path_in, ref_path_in, abs_path_out);
}
}
+
+# undef PATH_REL
+
+#endif
More information about the Bf-blender-cvs
mailing list