| 77 * have something. |
77 * have something. |
| 78 */ |
78 */ |
| 79 if(path != NULL) { |
79 if(path != NULL) { |
| 80 g_assert_cmpstr(purple_image_get_path(image), ==, path); |
80 g_assert_cmpstr(purple_image_get_path(image), ==, path); |
| 81 } else { |
81 } else { |
| 82 g_assert_cmpstr(purple_image_get_path(image), !=, ""); |
82 const gchar *apath = purple_image_get_path(image); |
| |
83 |
| |
84 g_assert(apath); |
| |
85 g_assert_cmpstr(apath, !=, ""); |
| 83 } |
86 } |
| 84 |
87 |
| 85 g_assert_cmpstr(purple_image_get_extension(image), ==, ext); |
88 g_assert_cmpstr(purple_image_get_extension(image), ==, ext); |
| 86 g_assert_cmpstr(purple_image_get_mimetype(image), ==, mimetype); |
89 g_assert_cmpstr(purple_image_get_mimetype(image), ==, mimetype); |
| 87 |
90 |
| 158 *****************************************************************************/ |
161 *****************************************************************************/ |
| 159 gint |
162 gint |
| 160 main(gint argc, gchar **argv) { |
163 main(gint argc, gchar **argv) { |
| 161 g_test_init(&argc, &argv, NULL); |
164 g_test_init(&argc, &argv, NULL); |
| 162 |
165 |
| |
166 #if GLIB_CHECK_VERSION(2, 38, 0) |
| |
167 g_test_set_nonfatal_assertions(); |
| |
168 #endif /* GLIB_CHECK_VERSION(2, 38, 0) */ |
| |
169 |
| 163 g_test_add_func("/image/new-from-bytes", test_image_new_from_bytes); |
170 g_test_add_func("/image/new-from-bytes", test_image_new_from_bytes); |
| 164 g_test_add_func("/image/new-from-data", test_image_new_from_data); |
171 g_test_add_func("/image/new-from-data", test_image_new_from_data); |
| 165 g_test_add_func("/image/new-from-file", test_image_new_from_file); |
172 g_test_add_func("/image/new-from-file", test_image_new_from_file); |
| 166 |
173 |
| 167 return g_test_run(); |
174 return g_test_run(); |