tests: use new g_test_build_filename() API

Port most of the tests to the new g_test_build_filename() API.

https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
Ryan Lortie
2013-05-28 12:48:37 -04:00
parent 0c4806733c
commit 58c6ca32aa
19 changed files with 62 additions and 200 deletions

View File

@@ -27,8 +27,6 @@
#include <stdlib.h>
#include <string.h>
static const gchar *datapath;
static void
test_g_icon_to_string (void)
{
@@ -469,7 +467,7 @@ test_file_icon (void)
gchar *str;
gchar *path;
path = g_strconcat (datapath, "/g-icon.c", NULL);
path = g_test_build_filename (G_TEST_DISTED, "g-icon.c", NULL);
file = g_file_new_for_path (path);
icon = g_file_icon_new (file);
@@ -497,11 +495,6 @@ int
main (int argc,
char *argv[])
{
if (g_getenv ("G_TEST_DATA"))
datapath = g_getenv ("G_TEST_DATA");
else
datapath = SRCDIR;
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/icons/to-string", test_g_icon_to_string);