GNOME Bugzilla – Bug 673216
[W32] gtestutils does not use path separators consistently
Last modified: 2012-04-07 00:51:37 UTC
GTest documentation shows "/" being used as path separator when calling g_test_add_func(). g_test_create_case() checks that its first argument contains no "/" and fails if that is not so. Tests often (always?) use "/" explicitly for testpaths when calling g_test_add_func(). g_test_add_vtable() uses G_DIR_SEPARATOR_S to split its first argument. On W32 G_DIR_SEPARATOR_S is defined to "\\". At least one test (tests/gobject/gvalue-test) fails because of that. Fix: either mandate the use of "/" and modify g_test_add_vtable() to use "/", or mandate the use of G_DIR_SEPARATOR_S and use it in g_test_create_case() and in testcases
Created attachment 211013 [details] [review] A very complex patch fox rectifying the issue
Attached a very complex patch for rectifying the issue. Applies on top of glib-2.32.0. Please, review it very carefully before applying, as it might break the whole testing API.
The following fixes have been pushed: 8db4b94 Always use '/' in test paths e52cf81 Don't return values from void functions
Created attachment 211520 [details] [review] Always use '/' in test paths It does not make much sense to use a platform-dependent directory separator in these strings, since they are not filesystem paths.
Created attachment 211521 [details] [review] Don't return values from void functions Sun CC does not take that lightly.