Add some more cases to the app-id unit tests
[glib.git] / gio / tests / autoptr.c
blob9ff1428ea72edc28a9b2eda8bcd9d7d54da180b3
1 #include <gio/gio.h>
3 static void
4 test_autoptr (void)
6 g_autoptr(GFile) p = g_file_new_for_path ("/blah");
7 g_autoptr(GInetAddress) a = g_inet_address_new_from_string ("127.0.0.1");
8 g_autofree gchar *path = g_file_get_path (p);
9 g_autofree gchar *istr = g_inet_address_to_string (a);
11 g_assert_cmpstr (path, ==, "/blah");
12 g_assert_cmpstr (istr, ==, "127.0.0.1");
15 int
16 main (int argc, char *argv[])
18 g_test_init (&argc, &argv, NULL);
20 g_test_add_func ("/autoptr/autoptr", test_autoptr);
22 return g_test_run ();