gtest: Add more path building API

Add a pair of functions for returning strings that don't need to be
freed.  This is a bit of a hack but it will turn the 99% case of using
these functions from:

  gchar *tmp;
  tmp = g_test_build_filename (...);
  fd = open (tmp, ...);
  g_free (tmp);

to:

  fd = open (g_test_get_filename (...), ...);

which is a pretty substantial win.

https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
Ryan Lortie
2013-05-28 13:22:59 -04:00
parent 58c6ca32aa
commit 575a9da718
3 changed files with 120 additions and 17 deletions

View File

@@ -2918,6 +2918,8 @@ g_test_add
GTestFileType
g_test_build_filename
g_test_get_filename
g_test_get_dir
g_test_fail
g_test_message