1 /*
2 * Photos - access, organize and share your photos on GNOME
3 * Copyright © 2018 – 2020 Red Hat, Inc.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19
20 #include "config.h"
21
22 #include <locale.h>
23
24 #include <gegl.h>
25 #include <gio/gio.h>
26 #include <glib.h>
27
28 #include "photos-debug.h"
29 #include "photos-gegl.h"
30 #include "photos-operation-insta-common.h"
31 #include "photos-pipeline.h"
32
33
34 typedef struct _PhotosTestPipelineFixture PhotosTestPipelineFixture;
35
36 struct _PhotosTestPipelineFixture
37 {
38 GAsyncResult *res;
39 GMainContext *context;
40 GMainLoop *loop;
41 };
42
43
44 static gchar *
photos_test_pipeline_filename_to_uri(const gchar * filename)45 photos_test_pipeline_filename_to_uri (const gchar *filename)
46 {
47 g_autoptr (GFile) file = NULL;
48 g_autofree gchar *path_relative = NULL;
49 gchar *uri = NULL;
50
51 path_relative = g_test_build_filename (G_TEST_DIST, filename, NULL);
52 file = g_file_new_for_path (path_relative);
53 uri = g_file_get_uri (file);
54 return uri;
55 }
56
57
58 static void
photos_test_pipeline_setup(PhotosTestPipelineFixture * fixture,gconstpointer user_data)59 photos_test_pipeline_setup (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
60 {
61 fixture->context = g_main_context_new ();
62 g_main_context_push_thread_default (fixture->context);
63 fixture->loop = g_main_loop_new (fixture->context, FALSE);
64 }
65
66
67 static void
photos_test_pipeline_teardown(PhotosTestPipelineFixture * fixture,gconstpointer user_data)68 photos_test_pipeline_teardown (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
69 {
70 g_clear_object (&fixture->res);
71 g_main_context_pop_thread_default (fixture->context);
72 g_main_context_unref (fixture->context);
73 g_main_loop_unref (fixture->loop);
74 }
75
76
77 static void
photos_test_pipeline_async(GObject * source_object,GAsyncResult * res,gpointer user_data)78 photos_test_pipeline_async (GObject *source_object, GAsyncResult *res, gpointer user_data)
79 {
80 PhotosTestPipelineFixture *fixture = (PhotosTestPipelineFixture *) user_data;
81
82 g_assert_null (fixture->res);
83 fixture->res = g_object_ref (res);
84 g_main_loop_quit (fixture->loop);
85 }
86
87
88 static void
photos_test_pipeline_check_empty(PhotosPipeline * pipeline,GeglNode * parent_expected)89 photos_test_pipeline_check_empty (PhotosPipeline *pipeline, GeglNode *parent_expected)
90 {
91 g_autoptr (GSList) children = NULL;
92 GeglNode *graph;
93 GeglNode *input;
94 GeglNode *output;
95 GeglNode *parent_actual;
96 GeglNode *previous;
97 gboolean is_edited;
98 const gchar *operation;
99 g_autofree gchar *previous_pad_name = NULL;
100 guint length;
101
102 g_assert_true (PHOTOS_IS_PIPELINE (pipeline));
103
104 graph = photos_pipeline_get_graph (pipeline);
105 parent_actual = gegl_node_get_parent (graph);
106 g_assert_true (parent_actual == parent_expected);
107
108 input = gegl_node_get_input_proxy (graph, "input");
109 output = gegl_node_get_output_proxy (graph, "output");
110 previous = gegl_node_get_producer (output, "input", &previous_pad_name);
111 g_assert_true (previous == input);
112 g_assert_cmpstr (previous_pad_name, ==, "output");
113
114 children = gegl_node_get_children (graph);
115 length = g_slist_length (children);
116 g_assert_cmpuint (length, ==, 2);
117 operation = gegl_node_get_operation (GEGL_NODE (children->data));
118 g_assert_cmpstr (operation, ==, "gegl:nop");
119 operation = gegl_node_get_operation (GEGL_NODE (children->next->data));
120 g_assert_cmpstr (operation, ==, "gegl:nop");
121
122 is_edited = photos_pipeline_is_edited (pipeline);
123 g_assert_false (is_edited);
124 }
125
126
127 static void
photos_test_pipeline_check_full(PhotosPipeline * pipeline,GeglNode * parent_expected)128 photos_test_pipeline_check_full (PhotosPipeline *pipeline, GeglNode *parent_expected)
129 {
130 g_autoptr (GSList) children = NULL;
131 GeglNode *graph;
132 GeglNode *input;
133 GeglNode *output;
134 GeglNode *parent_actual;
135 GeglNode *previous;
136 gboolean is_edited;
137 const gchar *operation;
138 g_autofree gchar *previous_pad_name = NULL;
139 guint length;
140
141 g_assert_true (PHOTOS_IS_PIPELINE (pipeline));
142
143 graph = photos_pipeline_get_graph (pipeline);
144 parent_actual = gegl_node_get_parent (graph);
145 g_assert_true (parent_actual == parent_expected);
146
147 children = gegl_node_get_children (graph);
148 length = g_slist_length (children);
149 g_assert_cmpuint (length, ==, 10);
150
151 input = gegl_node_get_input_proxy (graph, "input");
152 output = gegl_node_get_output_proxy (graph, "output");
153
154 previous = gegl_node_get_producer (output, "input", &previous_pad_name);
155 g_assert_true (previous != input);
156 g_assert_cmpstr (previous_pad_name, ==, "output");
157
158 operation = gegl_node_get_operation (GEGL_NODE (previous));
159 g_assert_cmpstr (operation, ==, "gegl:brightness-contrast");
160
161 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
162 g_assert_true (previous != input);
163 g_assert_cmpstr (previous_pad_name, ==, "output");
164
165 operation = gegl_node_get_operation (GEGL_NODE (previous));
166 g_assert_cmpstr (operation, ==, "gegl:exposure");
167
168 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
169 g_assert_true (previous != input);
170 g_assert_cmpstr (previous_pad_name, ==, "output");
171
172 operation = gegl_node_get_operation (GEGL_NODE (previous));
173 g_assert_cmpstr (operation, ==, "gegl:unsharp-mask");
174
175 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
176 g_assert_true (previous != input);
177 g_assert_cmpstr (previous_pad_name, ==, "output");
178
179 operation = gegl_node_get_operation (GEGL_NODE (previous));
180 g_assert_cmpstr (operation, ==, "photos:magic-filter");
181
182 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
183 g_assert_true (previous != input);
184 g_assert_cmpstr (previous_pad_name, ==, "output");
185
186 operation = gegl_node_get_operation (GEGL_NODE (previous));
187 g_assert_cmpstr (operation, ==, "photos:saturation");
188
189 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
190 g_assert_true (previous != input);
191 g_assert_cmpstr (previous_pad_name, ==, "output");
192
193 operation = gegl_node_get_operation (GEGL_NODE (previous));
194 g_assert_cmpstr (operation, ==, "gegl:shadows-highlights");
195
196 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
197 g_assert_true (previous != input);
198 g_assert_cmpstr (previous_pad_name, ==, "output");
199
200 operation = gegl_node_get_operation (GEGL_NODE (previous));
201 g_assert_cmpstr (operation, ==, "gegl:noise-reduction");
202
203 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
204 g_assert_true (previous != input);
205 g_assert_cmpstr (previous_pad_name, ==, "output");
206
207 operation = gegl_node_get_operation (GEGL_NODE (previous));
208 g_assert_cmpstr (operation, ==, "gegl:crop");
209
210 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
211 g_assert_true (previous == input);
212 g_assert_cmpstr (previous_pad_name, ==, "output");
213
214 is_edited = photos_pipeline_is_edited (pipeline);
215 g_assert_true (is_edited);
216 }
217
218
219 static void
photos_test_pipeline_check_insta_filter(PhotosPipeline * pipeline,PhotosOperationInstaPreset preset_expected,PhotosOperationInstaPreset preset_compat_expected)220 photos_test_pipeline_check_insta_filter (PhotosPipeline *pipeline,
221 PhotosOperationInstaPreset preset_expected,
222 PhotosOperationInstaPreset preset_compat_expected)
223 {
224 g_autoptr (GSList) children = NULL;
225 GeglNode *graph;
226 GeglNode *input;
227 GeglNode *output;
228 GeglNode *previous;
229 const gchar *operation;
230 g_autofree gchar *previous_pad_name = NULL;
231 gint preset;
232 guint length;
233
234 g_assert_true (PHOTOS_IS_PIPELINE (pipeline));
235
236 graph = photos_pipeline_get_graph (pipeline);
237
238 children = gegl_node_get_children (graph);
239 length = g_slist_length (children);
240 g_assert_cmpuint (length, ==, 3);
241
242 input = gegl_node_get_input_proxy (graph, "input");
243 output = gegl_node_get_output_proxy (graph, "output");
244
245 previous = gegl_node_get_producer (output, "input", &previous_pad_name);
246 g_assert_true (previous != input);
247 g_assert_cmpstr (previous_pad_name, ==, "output");
248
249 operation = gegl_node_get_operation (GEGL_NODE (previous));
250 g_assert_cmpstr (operation, ==, "photos:magic-filter");
251
252 gegl_node_get (previous, "preset", &preset, NULL);
253 g_assert_cmpint (preset, ==, preset_expected);
254 g_assert_cmpint (preset, ==, preset_compat_expected);
255
256 previous = gegl_node_get_producer (previous, "input", &previous_pad_name);
257 g_assert_true (previous == input);
258 g_assert_cmpstr (previous_pad_name, ==, "output");
259 }
260
261
262 static void
photos_test_pipeline_pipeline_new_async(GeglNode * parent,const gchar * const * filenames,GCancellable * cancellable,GAsyncReadyCallback callback,gpointer user_data)263 photos_test_pipeline_pipeline_new_async (GeglNode *parent,
264 const gchar *const *filenames,
265 GCancellable *cancellable,
266 GAsyncReadyCallback callback,
267 gpointer user_data)
268 {
269 g_auto (GStrv) uris = NULL;
270 guint i;
271 guint length;
272
273 length = g_strv_length ((GStrv) filenames);
274 uris = (gchar **) g_malloc0_n (length + 1, sizeof (gchar *));
275 for (i = 0; filenames[i] != 0; i++)
276 {
277 if (g_str_has_prefix (filenames[i], "photos-test-pipeline"))
278 uris[i] = photos_test_pipeline_filename_to_uri (filenames[i]);
279 else if (g_str_has_prefix (filenames[i], "this-does-not-exist"))
280 uris[i] = g_strconcat ("file:///", filenames[i], NULL);
281 else
282 uris[i] = g_strdup (filenames[i]);
283 }
284
285 photos_pipeline_new_async (parent, (const gchar *const *) uris, cancellable, callback, user_data);
286 }
287
288
289 static void
photos_test_pipeline_insta_filter_none(PhotosTestPipelineFixture * fixture,gconstpointer user_data)290 photos_test_pipeline_insta_filter_none (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
291 {
292 g_autoptr (PhotosPipeline) pipeline = NULL;
293 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-none.xml", NULL };
294
295 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
296 g_main_loop_run (fixture->loop);
297
298 {
299 g_autoptr (GError) error = NULL;
300
301 pipeline = photos_pipeline_new_finish (fixture->res, &error);
302 g_assert_no_error (error);
303 }
304
305 photos_test_pipeline_check_insta_filter (pipeline,
306 PHOTOS_OPERATION_INSTA_PRESET_NONE,
307 PHOTOS_OPERATION_INSTA_PRESET_NONE);
308 }
309
310
311 static void
photos_test_pipeline_insta_filter_1977(PhotosTestPipelineFixture * fixture,gconstpointer user_data)312 photos_test_pipeline_insta_filter_1977 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
313 {
314 g_autoptr (PhotosPipeline) pipeline = NULL;
315 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-1977.xml", NULL };
316
317 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
318 g_main_loop_run (fixture->loop);
319
320 {
321 g_autoptr (GError) error = NULL;
322
323 pipeline = photos_pipeline_new_finish (fixture->res, &error);
324 g_assert_no_error (error);
325 }
326
327 photos_test_pipeline_check_insta_filter (pipeline,
328 PHOTOS_OPERATION_INSTA_PRESET_1977,
329 PHOTOS_OPERATION_INSTA_PRESET_1947);
330 }
331
332
333 static void
photos_test_pipeline_insta_filter_brannan(PhotosTestPipelineFixture * fixture,gconstpointer user_data)334 photos_test_pipeline_insta_filter_brannan (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
335 {
336 g_autoptr (PhotosPipeline) pipeline = NULL;
337 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-brannan.xml", NULL };
338
339 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
340 g_main_loop_run (fixture->loop);
341
342 {
343 g_autoptr (GError) error = NULL;
344
345 pipeline = photos_pipeline_new_finish (fixture->res, &error);
346 g_assert_no_error (error);
347 }
348
349 photos_test_pipeline_check_insta_filter (pipeline,
350 PHOTOS_OPERATION_INSTA_PRESET_BRANNAN,
351 PHOTOS_OPERATION_INSTA_PRESET_CALISTOGA);
352 }
353
354
355 static void
photos_test_pipeline_insta_filter_clarendon(PhotosTestPipelineFixture * fixture,gconstpointer user_data)356 photos_test_pipeline_insta_filter_clarendon (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
357 {
358 g_autoptr (PhotosPipeline) pipeline = NULL;
359 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-clarendon.xml", NULL };
360
361 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
362 g_main_loop_run (fixture->loop);
363
364 {
365 g_autoptr (GError) error = NULL;
366
367 pipeline = photos_pipeline_new_finish (fixture->res, &error);
368 g_assert_no_error (error);
369 }
370
371 photos_test_pipeline_check_insta_filter (pipeline,
372 PHOTOS_OPERATION_INSTA_PRESET_CLARENDON,
373 PHOTOS_OPERATION_INSTA_PRESET_TRENCIN);
374 }
375
376
377 static void
photos_test_pipeline_insta_filter_gotham(PhotosTestPipelineFixture * fixture,gconstpointer user_data)378 photos_test_pipeline_insta_filter_gotham (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
379 {
380 g_autoptr (PhotosPipeline) pipeline = NULL;
381 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-gotham.xml", NULL };
382
383 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
384 g_main_loop_run (fixture->loop);
385
386 {
387 g_autoptr (GError) error = NULL;
388
389 pipeline = photos_pipeline_new_finish (fixture->res, &error);
390 g_assert_no_error (error);
391 }
392
393 photos_test_pipeline_check_insta_filter (pipeline,
394 PHOTOS_OPERATION_INSTA_PRESET_GOTHAM,
395 PHOTOS_OPERATION_INSTA_PRESET_MOGADISHU);
396 }
397
398
399 static void
photos_test_pipeline_insta_filter_hefe(PhotosTestPipelineFixture * fixture,gconstpointer user_data)400 photos_test_pipeline_insta_filter_hefe (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
401 {
402 g_autoptr (PhotosPipeline) pipeline = NULL;
403 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-hefe.xml", NULL };
404
405 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
406 g_main_loop_run (fixture->loop);
407
408 {
409 g_autoptr (GError) error = NULL;
410
411 pipeline = photos_pipeline_new_finish (fixture->res, &error);
412 g_assert_no_error (error);
413 }
414
415 photos_test_pipeline_check_insta_filter (pipeline,
416 PHOTOS_OPERATION_INSTA_PRESET_HEFE,
417 PHOTOS_OPERATION_INSTA_PRESET_CAAP);
418 }
419
420
421 static void
photos_test_pipeline_insta_filter_nashville(PhotosTestPipelineFixture * fixture,gconstpointer user_data)422 photos_test_pipeline_insta_filter_nashville (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
423 {
424 g_autoptr (PhotosPipeline) pipeline = NULL;
425 const gchar *const filenames[] = { "photos-test-pipeline-edited-insta-filter-nashville.xml", NULL };
426
427 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
428 g_main_loop_run (fixture->loop);
429
430 {
431 g_autoptr (GError) error = NULL;
432
433 pipeline = photos_pipeline_new_finish (fixture->res, &error);
434 g_assert_no_error (error);
435 }
436
437 photos_test_pipeline_check_insta_filter (pipeline,
438 PHOTOS_OPERATION_INSTA_PRESET_NASHVILLE,
439 PHOTOS_OPERATION_INSTA_PRESET_HOMETOWN);
440 }
441
442
443 static void
photos_test_pipeline_magic_filter_none(PhotosTestPipelineFixture * fixture,gconstpointer user_data)444 photos_test_pipeline_magic_filter_none (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
445 {
446 g_autoptr (PhotosPipeline) pipeline = NULL;
447 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-none.xml", NULL };
448
449 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
450 g_main_loop_run (fixture->loop);
451
452 {
453 g_autoptr (GError) error = NULL;
454
455 pipeline = photos_pipeline_new_finish (fixture->res, &error);
456 g_assert_no_error (error);
457 }
458
459 photos_test_pipeline_check_insta_filter (pipeline,
460 PHOTOS_OPERATION_INSTA_PRESET_NONE,
461 PHOTOS_OPERATION_INSTA_PRESET_NONE);
462 }
463
464
465 static void
photos_test_pipeline_magic_filter_1947(PhotosTestPipelineFixture * fixture,gconstpointer user_data)466 photos_test_pipeline_magic_filter_1947 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
467 {
468 g_autoptr (PhotosPipeline) pipeline = NULL;
469 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-1947.xml", NULL };
470
471 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
472 g_main_loop_run (fixture->loop);
473
474 {
475 g_autoptr (GError) error = NULL;
476
477 pipeline = photos_pipeline_new_finish (fixture->res, &error);
478 g_assert_no_error (error);
479 }
480
481 photos_test_pipeline_check_insta_filter (pipeline,
482 PHOTOS_OPERATION_INSTA_PRESET_1947,
483 PHOTOS_OPERATION_INSTA_PRESET_1977);
484 }
485
486
487 static void
photos_test_pipeline_magic_filter_calistoga(PhotosTestPipelineFixture * fixture,gconstpointer user_data)488 photos_test_pipeline_magic_filter_calistoga (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
489 {
490 g_autoptr (PhotosPipeline) pipeline = NULL;
491 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-calistoga.xml", NULL };
492
493 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
494 g_main_loop_run (fixture->loop);
495
496 {
497 g_autoptr (GError) error = NULL;
498
499 pipeline = photos_pipeline_new_finish (fixture->res, &error);
500 g_assert_no_error (error);
501 }
502
503 photos_test_pipeline_check_insta_filter (pipeline,
504 PHOTOS_OPERATION_INSTA_PRESET_CALISTOGA,
505 PHOTOS_OPERATION_INSTA_PRESET_BRANNAN);
506 }
507
508
509 static void
photos_test_pipeline_magic_filter_trencin(PhotosTestPipelineFixture * fixture,gconstpointer user_data)510 photos_test_pipeline_magic_filter_trencin (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
511 {
512 g_autoptr (PhotosPipeline) pipeline = NULL;
513 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-trencin.xml", NULL };
514
515 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
516 g_main_loop_run (fixture->loop);
517
518 {
519 g_autoptr (GError) error = NULL;
520
521 pipeline = photos_pipeline_new_finish (fixture->res, &error);
522 g_assert_no_error (error);
523 }
524
525 photos_test_pipeline_check_insta_filter (pipeline,
526 PHOTOS_OPERATION_INSTA_PRESET_TRENCIN,
527 PHOTOS_OPERATION_INSTA_PRESET_CLARENDON);
528 }
529
530
531 static void
photos_test_pipeline_magic_filter_mogadishu(PhotosTestPipelineFixture * fixture,gconstpointer user_data)532 photos_test_pipeline_magic_filter_mogadishu (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
533 {
534 g_autoptr (PhotosPipeline) pipeline = NULL;
535 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-mogadishu.xml", NULL };
536
537 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
538 g_main_loop_run (fixture->loop);
539
540 {
541 g_autoptr (GError) error = NULL;
542
543 pipeline = photos_pipeline_new_finish (fixture->res, &error);
544 g_assert_no_error (error);
545 }
546
547 photos_test_pipeline_check_insta_filter (pipeline,
548 PHOTOS_OPERATION_INSTA_PRESET_MOGADISHU,
549 PHOTOS_OPERATION_INSTA_PRESET_GOTHAM);
550 }
551
552
553 static void
photos_test_pipeline_magic_filter_caap(PhotosTestPipelineFixture * fixture,gconstpointer user_data)554 photos_test_pipeline_magic_filter_caap (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
555 {
556 g_autoptr (PhotosPipeline) pipeline = NULL;
557 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-caap.xml", NULL };
558
559 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
560 g_main_loop_run (fixture->loop);
561
562 {
563 g_autoptr (GError) error = NULL;
564
565 pipeline = photos_pipeline_new_finish (fixture->res, &error);
566 g_assert_no_error (error);
567 }
568
569 photos_test_pipeline_check_insta_filter (pipeline,
570 PHOTOS_OPERATION_INSTA_PRESET_CAAP,
571 PHOTOS_OPERATION_INSTA_PRESET_HEFE);
572 }
573
574
575 static void
photos_test_pipeline_magic_filter_hometown(PhotosTestPipelineFixture * fixture,gconstpointer user_data)576 photos_test_pipeline_magic_filter_hometown (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
577 {
578 g_autoptr (PhotosPipeline) pipeline = NULL;
579 const gchar *const filenames[] = { "photos-test-pipeline-edited-magic-filter-hometown.xml", NULL };
580
581 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
582 g_main_loop_run (fixture->loop);
583
584 {
585 g_autoptr (GError) error = NULL;
586
587 pipeline = photos_pipeline_new_finish (fixture->res, &error);
588 g_assert_no_error (error);
589 }
590
591 photos_test_pipeline_check_insta_filter (pipeline,
592 PHOTOS_OPERATION_INSTA_PRESET_HOMETOWN,
593 PHOTOS_OPERATION_INSTA_PRESET_NASHVILLE);
594 }
595
596
597 static void
photos_test_pipeline_no_parent_blank_uris_0(PhotosTestPipelineFixture * fixture,gconstpointer user_data)598 photos_test_pipeline_no_parent_blank_uris_0 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
599 {
600 g_autoptr (PhotosPipeline) pipeline = NULL;
601 const gchar *const uris[] = { NULL };
602
603 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
604 g_main_loop_run (fixture->loop);
605
606 {
607 g_autoptr (GError) error = NULL;
608
609 pipeline = photos_pipeline_new_finish (fixture->res, &error);
610 g_assert_no_error (error);
611 }
612
613 photos_test_pipeline_check_empty (pipeline, NULL);
614 }
615
616
617 static void
photos_test_pipeline_no_parent_blank_uris_1(PhotosTestPipelineFixture * fixture,gconstpointer user_data)618 photos_test_pipeline_no_parent_blank_uris_1 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
619 {
620 g_autoptr (PhotosPipeline) pipeline = NULL;
621 const gchar *const filenames[] = { NULL, "photos-test-pipeline-not-edited-00.xml", NULL };
622
623 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
624 g_main_loop_run (fixture->loop);
625
626 {
627 g_autoptr (GError) error = NULL;
628
629 pipeline = photos_pipeline_new_finish (fixture->res, &error);
630 g_assert_no_error (error);
631 }
632
633 photos_test_pipeline_check_empty (pipeline, NULL);
634 }
635
636
637 static void
photos_test_pipeline_no_parent_blank_uris_2(PhotosTestPipelineFixture * fixture,gconstpointer user_data)638 photos_test_pipeline_no_parent_blank_uris_2 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
639 {
640 g_autoptr (PhotosPipeline) pipeline = NULL;
641 const gchar *const filenames[] = { NULL, "photos-test-pipeline-edited-00.xml", NULL };
642
643 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
644 g_main_loop_run (fixture->loop);
645
646 {
647 g_autoptr (GError) error = NULL;
648
649 pipeline = photos_pipeline_new_finish (fixture->res, &error);
650 g_assert_no_error (error);
651 }
652
653 photos_test_pipeline_check_empty (pipeline, NULL);
654 }
655
656
657 static void
photos_test_pipeline_no_parent_blank_uris_3(PhotosTestPipelineFixture * fixture,gconstpointer user_data)658 photos_test_pipeline_no_parent_blank_uris_3 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
659 {
660 g_autoptr (PhotosPipeline) pipeline = NULL;
661 const gchar *const filenames[] = { NULL, "this-does-not-exist", NULL };
662
663 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
664 g_main_loop_run (fixture->loop);
665
666 {
667 g_autoptr (GError) error = NULL;
668
669 pipeline = photos_pipeline_new_finish (fixture->res, &error);
670 g_assert_no_error (error);
671 }
672
673 photos_test_pipeline_check_empty (pipeline, NULL);
674 }
675
676
677 static void
photos_test_pipeline_no_parent_blank_uris_4(PhotosTestPipelineFixture * fixture,gconstpointer user_data)678 photos_test_pipeline_no_parent_blank_uris_4 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
679 {
680 g_autoptr (PhotosPipeline) pipeline = NULL;
681 const gchar *const uris[] = { NULL, "this-should-not-be-used", NULL };
682
683 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
684 g_main_loop_run (fixture->loop);
685
686 {
687 g_autoptr (GError) error = NULL;
688
689 pipeline = photos_pipeline_new_finish (fixture->res, &error);
690 g_assert_no_error (error);
691 }
692
693 photos_test_pipeline_check_empty (pipeline, NULL);
694 }
695
696
697 static void
photos_test_pipeline_no_parent_blank_uris_5(PhotosTestPipelineFixture * fixture,gconstpointer user_data)698 photos_test_pipeline_no_parent_blank_uris_5 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
699 {
700 g_autoptr (PhotosPipeline) pipeline = NULL;
701 const gchar *const uris[] = { "", NULL };
702
703 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
704 g_main_loop_run (fixture->loop);
705
706 {
707 g_autoptr (GError) error = NULL;
708
709 pipeline = photos_pipeline_new_finish (fixture->res, &error);
710 g_assert_no_error (error);
711 }
712
713 photos_test_pipeline_check_empty (pipeline, NULL);
714 }
715
716
717 static void
photos_test_pipeline_no_parent_blank_uris_6(PhotosTestPipelineFixture * fixture,gconstpointer user_data)718 photos_test_pipeline_no_parent_blank_uris_6 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
719 {
720 g_autoptr (PhotosPipeline) pipeline = NULL;
721 const gchar *const filenames[] = { "", "photos-test-pipeline-not-edited-00.xml", NULL };
722
723 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
724 g_main_loop_run (fixture->loop);
725
726 {
727 g_autoptr (GError) error = NULL;
728
729 pipeline = photos_pipeline_new_finish (fixture->res, &error);
730 g_assert_no_error (error);
731 }
732
733 photos_test_pipeline_check_empty (pipeline, NULL);
734 }
735
736
737 static void
photos_test_pipeline_no_parent_blank_uris_7(PhotosTestPipelineFixture * fixture,gconstpointer user_data)738 photos_test_pipeline_no_parent_blank_uris_7 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
739 {
740 g_autoptr (PhotosPipeline) pipeline = NULL;
741 const gchar *const filenames[] = { "", "photos-test-pipeline-edited-00.xml", NULL };
742
743 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
744 g_main_loop_run (fixture->loop);
745
746 {
747 g_autoptr (GError) error = NULL;
748
749 pipeline = photos_pipeline_new_finish (fixture->res, &error);
750 g_assert_no_error (error);
751 }
752
753 photos_test_pipeline_check_empty (pipeline, NULL);
754 }
755
756
757 static void
photos_test_pipeline_no_parent_blank_uris_8(PhotosTestPipelineFixture * fixture,gconstpointer user_data)758 photos_test_pipeline_no_parent_blank_uris_8 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
759 {
760 g_autoptr (PhotosPipeline) pipeline = NULL;
761 const gchar *const filenames[] = { "", "this-does-not-exist", NULL };
762
763 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
764 g_main_loop_run (fixture->loop);
765
766 {
767 g_autoptr (GError) error = NULL;
768
769 pipeline = photos_pipeline_new_finish (fixture->res, &error);
770 g_assert_no_error (error);
771 }
772
773 photos_test_pipeline_check_empty (pipeline, NULL);
774 }
775
776
777 static void
photos_test_pipeline_no_parent_blank_uris_9(PhotosTestPipelineFixture * fixture,gconstpointer user_data)778 photos_test_pipeline_no_parent_blank_uris_9 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
779 {
780 g_autoptr (PhotosPipeline) pipeline = NULL;
781 const gchar *const uris[] = { "", "this-should-not-be-used", NULL };
782
783 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
784 g_main_loop_run (fixture->loop);
785
786 {
787 g_autoptr (GError) error = NULL;
788
789 pipeline = photos_pipeline_new_finish (fixture->res, &error);
790 g_assert_no_error (error);
791 }
792
793 photos_test_pipeline_check_empty (pipeline, NULL);
794 }
795
796
797 static void
photos_test_pipeline_no_parent_null_uris(PhotosTestPipelineFixture * fixture,gconstpointer user_data)798 photos_test_pipeline_no_parent_null_uris (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
799 {
800 g_autoptr (PhotosPipeline) pipeline = NULL;
801
802 photos_pipeline_new_async (NULL, NULL, NULL, photos_test_pipeline_async, fixture);
803 g_main_loop_run (fixture->loop);
804
805 {
806 g_autoptr (GError) error = NULL;
807
808 pipeline = photos_pipeline_new_finish (fixture->res, &error);
809 g_assert_no_error (error);
810 }
811
812 photos_test_pipeline_check_empty (pipeline, NULL);
813 }
814
815
816 static void
photos_test_pipeline_no_parent_with_uris_0(PhotosTestPipelineFixture * fixture,gconstpointer user_data)817 photos_test_pipeline_no_parent_with_uris_0 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
818 {
819 g_autoptr (PhotosPipeline) pipeline = NULL;
820 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", NULL };
821
822 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
823 g_main_loop_run (fixture->loop);
824
825 {
826 g_autoptr (GError) error = NULL;
827
828 pipeline = photos_pipeline_new_finish (fixture->res, &error);
829 g_assert_no_error (error);
830 }
831
832 photos_test_pipeline_check_empty (pipeline, NULL);
833 }
834
835
836 static void
photos_test_pipeline_no_parent_with_uris_1(PhotosTestPipelineFixture * fixture,gconstpointer user_data)837 photos_test_pipeline_no_parent_with_uris_1 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
838 {
839 g_autoptr (PhotosPipeline) pipeline = NULL;
840 const gchar *const filenames[] =
841 {
842 "photos-test-pipeline-not-edited-00.xml",
843 "photos-test-pipeline-edited-00.xml",
844 NULL
845 };
846
847 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
848 g_main_loop_run (fixture->loop);
849
850 {
851 g_autoptr (GError) error = NULL;
852
853 pipeline = photos_pipeline_new_finish (fixture->res, &error);
854 g_assert_no_error (error);
855 }
856
857 photos_test_pipeline_check_empty (pipeline, NULL);
858 }
859
860
861 static void
photos_test_pipeline_no_parent_with_uris_2(PhotosTestPipelineFixture * fixture,gconstpointer user_data)862 photos_test_pipeline_no_parent_with_uris_2 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
863 {
864 g_autoptr (PhotosPipeline) pipeline = NULL;
865 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", "this-does-not-exist", NULL };
866
867 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
868 g_main_loop_run (fixture->loop);
869
870 {
871 g_autoptr (GError) error = NULL;
872
873 pipeline = photos_pipeline_new_finish (fixture->res, &error);
874 g_assert_no_error (error);
875 }
876
877 photos_test_pipeline_check_empty (pipeline, NULL);
878 }
879
880
881 static void
photos_test_pipeline_no_parent_with_uris_3(PhotosTestPipelineFixture * fixture,gconstpointer user_data)882 photos_test_pipeline_no_parent_with_uris_3 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
883 {
884 g_autoptr (PhotosPipeline) pipeline = NULL;
885 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", "this-should-not-be-used", NULL };
886
887 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
888 g_main_loop_run (fixture->loop);
889
890 {
891 g_autoptr (GError) error = NULL;
892
893 pipeline = photos_pipeline_new_finish (fixture->res, &error);
894 g_assert_no_error (error);
895 }
896
897 photos_test_pipeline_check_empty (pipeline, NULL);
898 }
899
900
901 static void
photos_test_pipeline_no_parent_with_uris_4(PhotosTestPipelineFixture * fixture,gconstpointer user_data)902 photos_test_pipeline_no_parent_with_uris_4 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
903 {
904 g_autoptr (PhotosPipeline) pipeline = NULL;
905 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", NULL };
906
907 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
908 g_main_loop_run (fixture->loop);
909
910 {
911 g_autoptr (GError) error = NULL;
912
913 pipeline = photos_pipeline_new_finish (fixture->res, &error);
914 g_assert_no_error (error);
915 }
916
917 photos_test_pipeline_check_full (pipeline, NULL);
918 }
919
920
921 static void
photos_test_pipeline_no_parent_with_uris_5(PhotosTestPipelineFixture * fixture,gconstpointer user_data)922 photos_test_pipeline_no_parent_with_uris_5 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
923 {
924 g_autoptr (PhotosPipeline) pipeline = NULL;
925 const gchar *const filenames[] =
926 {
927 "photos-test-pipeline-edited-00.xml",
928 "photos-test-pipeline-not-edited-00.xml",
929 NULL
930 };
931
932 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
933 g_main_loop_run (fixture->loop);
934
935 {
936 g_autoptr (GError) error = NULL;
937
938 pipeline = photos_pipeline_new_finish (fixture->res, &error);
939 g_assert_no_error (error);
940 }
941
942 photos_test_pipeline_check_full (pipeline, NULL);
943 }
944
945
946 static void
photos_test_pipeline_no_parent_with_uris_6(PhotosTestPipelineFixture * fixture,gconstpointer user_data)947 photos_test_pipeline_no_parent_with_uris_6 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
948 {
949 g_autoptr (PhotosPipeline) pipeline = NULL;
950 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", "this-does-not-exist", NULL };
951
952 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
953 g_main_loop_run (fixture->loop);
954
955 {
956 g_autoptr (GError) error = NULL;
957
958 pipeline = photos_pipeline_new_finish (fixture->res, &error);
959 g_assert_no_error (error);
960 }
961
962 photos_test_pipeline_check_full (pipeline, NULL);
963 }
964
965
966 static void
photos_test_pipeline_no_parent_with_uris_7(PhotosTestPipelineFixture * fixture,gconstpointer user_data)967 photos_test_pipeline_no_parent_with_uris_7 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
968 {
969 g_autoptr (PhotosPipeline) pipeline = NULL;
970 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", "this-should-not-be-used", NULL };
971
972 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
973 g_main_loop_run (fixture->loop);
974
975 {
976 g_autoptr (GError) error = NULL;
977
978 pipeline = photos_pipeline_new_finish (fixture->res, &error);
979 g_assert_no_error (error);
980 }
981
982 photos_test_pipeline_check_full (pipeline, NULL);
983 }
984
985
986 static void
photos_test_pipeline_no_parent_with_uris_8(PhotosTestPipelineFixture * fixture,gconstpointer user_data)987 photos_test_pipeline_no_parent_with_uris_8 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
988 {
989 g_autoptr (PhotosPipeline) pipeline = NULL;
990 const gchar *const filenames[] = { "this-does-not-exist", NULL };
991
992 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
993 g_main_loop_run (fixture->loop);
994
995 {
996 g_autoptr (GError) error = NULL;
997
998 pipeline = photos_pipeline_new_finish (fixture->res, &error);
999 g_assert_no_error (error);
1000 }
1001
1002 photos_test_pipeline_check_empty (pipeline, NULL);
1003 }
1004
1005
1006 static void
photos_test_pipeline_no_parent_with_uris_9(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1007 photos_test_pipeline_no_parent_with_uris_9 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1008 {
1009 g_autoptr (PhotosPipeline) pipeline = NULL;
1010 const gchar *const filenames[] = { "this-does-not-exist", "photos-test-pipeline-not-edited-00.xml", NULL };
1011
1012 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1013 g_main_loop_run (fixture->loop);
1014
1015 {
1016 g_autoptr (GError) error = NULL;
1017
1018 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1019 g_assert_no_error (error);
1020 }
1021
1022 photos_test_pipeline_check_empty (pipeline, NULL);
1023 }
1024
1025
1026 static void
photos_test_pipeline_no_parent_with_uris_10(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1027 photos_test_pipeline_no_parent_with_uris_10 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1028 {
1029 g_autoptr (PhotosPipeline) pipeline = NULL;
1030 const gchar *const filenames[] = { "this-does-not-exist", "photos-test-pipeline-edited-00.xml", NULL };
1031
1032 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1033 g_main_loop_run (fixture->loop);
1034
1035 {
1036 g_autoptr (GError) error = NULL;
1037
1038 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1039 g_assert_no_error (error);
1040 }
1041
1042 photos_test_pipeline_check_full (pipeline, NULL);
1043 }
1044
1045
1046 static void
photos_test_pipeline_no_parent_with_uris_11(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1047 photos_test_pipeline_no_parent_with_uris_11 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1048 {
1049 g_autoptr (PhotosPipeline) pipeline = NULL;
1050 const gchar *const filenames[] = { "this-does-not-exist", "this-does-not-exist-either", NULL };
1051
1052 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1053 g_main_loop_run (fixture->loop);
1054
1055 {
1056 g_autoptr (GError) error = NULL;
1057
1058 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1059 g_assert_no_error (error);
1060 }
1061
1062 photos_test_pipeline_check_empty (pipeline, NULL);
1063 }
1064
1065
1066 static void
photos_test_pipeline_no_parent_with_uris_12(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1067 photos_test_pipeline_no_parent_with_uris_12 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1068 {
1069 g_autoptr (PhotosPipeline) pipeline = NULL;
1070 const gchar *const filenames[] = { "this-does-not-exist", "this-should-not-be-used", NULL };
1071
1072 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1073 g_main_loop_run (fixture->loop);
1074
1075 {
1076 g_autoptr (GError) error = NULL;
1077
1078 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1079 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1080 }
1081
1082 g_assert_null (pipeline);
1083 }
1084
1085
1086 static void
photos_test_pipeline_no_parent_with_uris_13(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1087 photos_test_pipeline_no_parent_with_uris_13 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1088 {
1089 g_autoptr (PhotosPipeline) pipeline = NULL;
1090 const gchar *const filenames[] = { "this-should-not-be-used", NULL };
1091
1092 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1093 g_main_loop_run (fixture->loop);
1094
1095 {
1096 g_autoptr (GError) error = NULL;
1097
1098 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1099 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1100 }
1101
1102 g_assert_null (pipeline);
1103 }
1104
1105
1106 static void
photos_test_pipeline_no_parent_with_uris_14(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1107 photos_test_pipeline_no_parent_with_uris_14 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1108 {
1109 g_autoptr (PhotosPipeline) pipeline = NULL;
1110 const gchar *const filenames[] = { "this-should-not-be-used", "photos-test-pipeline-not-edited-00.xml", NULL };
1111
1112 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1113 g_main_loop_run (fixture->loop);
1114
1115 {
1116 g_autoptr (GError) error = NULL;
1117
1118 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1119 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1120 }
1121
1122 g_assert_null (pipeline);
1123 }
1124
1125
1126 static void
photos_test_pipeline_no_parent_with_uris_15(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1127 photos_test_pipeline_no_parent_with_uris_15 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1128 {
1129 g_autoptr (PhotosPipeline) pipeline = NULL;
1130 const gchar *const filenames[] = { "this-should-not-be-used", "photos-test-pipeline-edited-00.xml", NULL };
1131
1132 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1133 g_main_loop_run (fixture->loop);
1134
1135 {
1136 g_autoptr (GError) error = NULL;
1137
1138 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1139 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1140 }
1141
1142 g_assert_null (pipeline);
1143 }
1144
1145
1146 static void
photos_test_pipeline_no_parent_with_uris_16(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1147 photos_test_pipeline_no_parent_with_uris_16 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1148 {
1149 g_autoptr (PhotosPipeline) pipeline = NULL;
1150 const gchar *const filenames[] = { "this-should-not-be-used", "this-does-not-exist", NULL };
1151
1152 photos_test_pipeline_pipeline_new_async (NULL, filenames, NULL, photos_test_pipeline_async, fixture);
1153 g_main_loop_run (fixture->loop);
1154
1155 {
1156 g_autoptr (GError) error = NULL;
1157
1158 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1159 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1160 }
1161
1162 g_assert_null (pipeline);
1163 }
1164
1165
1166 static void
photos_test_pipeline_no_parent_with_uris_17(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1167 photos_test_pipeline_no_parent_with_uris_17 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1168 {
1169 g_autoptr (PhotosPipeline) pipeline = NULL;
1170 const gchar *const uris[] = { "this-should-not-be-used", "this-should-not-be-used-either", NULL };
1171
1172 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
1173 g_main_loop_run (fixture->loop);
1174
1175 {
1176 g_autoptr (GError) error = NULL;
1177
1178 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1179 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1180 }
1181
1182 g_assert_null (pipeline);
1183 }
1184
1185
1186 static void
photos_test_pipeline_with_parent_blank_uris_0(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1187 photos_test_pipeline_with_parent_blank_uris_0 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1188 {
1189 g_autoptr (GeglNode) parent = NULL;
1190 g_autoptr (PhotosPipeline) pipeline = NULL;
1191 const gchar *const uris[] = { NULL };
1192
1193 parent = gegl_node_new ();
1194 photos_pipeline_new_async (parent, uris, NULL, photos_test_pipeline_async, fixture);
1195 g_main_loop_run (fixture->loop);
1196
1197 {
1198 g_autoptr (GError) error = NULL;
1199
1200 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1201 g_assert_no_error (error);
1202 }
1203
1204 photos_test_pipeline_check_empty (pipeline, parent);
1205 }
1206
1207
1208 static void
photos_test_pipeline_with_parent_blank_uris_1(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1209 photos_test_pipeline_with_parent_blank_uris_1 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1210 {
1211 g_autoptr (GeglNode) parent = NULL;
1212 g_autoptr (PhotosPipeline) pipeline = NULL;
1213 const gchar *const filenames[] = { NULL, "photos-test-pipeline-not-edited-00.xml", NULL };
1214
1215 parent = gegl_node_new ();
1216 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1217 g_main_loop_run (fixture->loop);
1218
1219 {
1220 g_autoptr (GError) error = NULL;
1221
1222 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1223 g_assert_no_error (error);
1224 }
1225
1226 photos_test_pipeline_check_empty (pipeline, parent);
1227 }
1228
1229
1230 static void
photos_test_pipeline_with_parent_blank_uris_2(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1231 photos_test_pipeline_with_parent_blank_uris_2 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1232 {
1233 g_autoptr (GeglNode) parent = NULL;
1234 g_autoptr (PhotosPipeline) pipeline = NULL;
1235 const gchar *const filenames[] = { NULL, "photos-test-pipeline-edited-00.xml", NULL };
1236
1237 parent = gegl_node_new ();
1238 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1239 g_main_loop_run (fixture->loop);
1240
1241 {
1242 g_autoptr (GError) error = NULL;
1243
1244 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1245 g_assert_no_error (error);
1246 }
1247
1248 photos_test_pipeline_check_empty (pipeline, parent);
1249 }
1250
1251
1252 static void
photos_test_pipeline_with_parent_blank_uris_3(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1253 photos_test_pipeline_with_parent_blank_uris_3 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1254 {
1255 g_autoptr (GeglNode) parent = NULL;
1256 g_autoptr (PhotosPipeline) pipeline = NULL;
1257 const gchar *const uris[] = { NULL, "this-does-not-exist", NULL };
1258
1259 parent = gegl_node_new ();
1260 photos_pipeline_new_async (parent, uris, NULL, photos_test_pipeline_async, fixture);
1261 g_main_loop_run (fixture->loop);
1262
1263 {
1264 g_autoptr (GError) error = NULL;
1265
1266 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1267 g_assert_no_error (error);
1268 }
1269
1270 photos_test_pipeline_check_empty (pipeline, parent);
1271 }
1272
1273
1274 static void
photos_test_pipeline_with_parent_blank_uris_4(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1275 photos_test_pipeline_with_parent_blank_uris_4 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1276 {
1277 g_autoptr (GeglNode) parent = NULL;
1278 g_autoptr (PhotosPipeline) pipeline = NULL;
1279 const gchar *const uris[] = { NULL, "this-should-not-be-used", NULL };
1280
1281 parent = gegl_node_new ();
1282 photos_pipeline_new_async (parent, uris, NULL, photos_test_pipeline_async, fixture);
1283 g_main_loop_run (fixture->loop);
1284
1285 {
1286 g_autoptr (GError) error = NULL;
1287
1288 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1289 g_assert_no_error (error);
1290 }
1291
1292 photos_test_pipeline_check_empty (pipeline, parent);
1293 }
1294
1295
1296 static void
photos_test_pipeline_with_parent_blank_uris_5(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1297 photos_test_pipeline_with_parent_blank_uris_5 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1298 {
1299 g_autoptr (GeglNode) parent = NULL;
1300 g_autoptr (PhotosPipeline) pipeline = NULL;
1301 const gchar *const uris[] = { "", NULL };
1302
1303 photos_pipeline_new_async (NULL, uris, NULL, photos_test_pipeline_async, fixture);
1304 g_main_loop_run (fixture->loop);
1305
1306 {
1307 g_autoptr (GError) error = NULL;
1308
1309 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1310 g_assert_no_error (error);
1311 }
1312
1313 photos_test_pipeline_check_empty (pipeline, parent);
1314 }
1315
1316
1317 static void
photos_test_pipeline_with_parent_blank_uris_6(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1318 photos_test_pipeline_with_parent_blank_uris_6 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1319 {
1320 g_autoptr (GeglNode) parent = NULL;
1321 g_autoptr (PhotosPipeline) pipeline = NULL;
1322 const gchar *const filenames[] = { "", "photos-test-pipeline-not-edited-00.xml", NULL };
1323
1324 parent = gegl_node_new ();
1325 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1326 g_main_loop_run (fixture->loop);
1327
1328 {
1329 g_autoptr (GError) error = NULL;
1330
1331 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1332 g_assert_no_error (error);
1333 }
1334
1335 photos_test_pipeline_check_empty (pipeline, parent);
1336 }
1337
1338
1339 static void
photos_test_pipeline_with_parent_blank_uris_7(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1340 photos_test_pipeline_with_parent_blank_uris_7 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1341 {
1342 g_autoptr (GeglNode) parent = NULL;
1343 g_autoptr (PhotosPipeline) pipeline = NULL;
1344 const gchar *const filenames[] = { "", "photos-test-pipeline-edited-00.xml", NULL };
1345
1346 parent = gegl_node_new ();
1347 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1348 g_main_loop_run (fixture->loop);
1349
1350 {
1351 g_autoptr (GError) error = NULL;
1352
1353 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1354 g_assert_no_error (error);
1355 }
1356
1357 photos_test_pipeline_check_empty (pipeline, parent);
1358 }
1359
1360
1361 static void
photos_test_pipeline_with_parent_blank_uris_8(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1362 photos_test_pipeline_with_parent_blank_uris_8 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1363 {
1364 g_autoptr (GeglNode) parent = NULL;
1365 g_autoptr (PhotosPipeline) pipeline = NULL;
1366 const gchar *const filenames[] = { "", "this-does-not-exist", NULL };
1367
1368 parent = gegl_node_new ();
1369 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1370 g_main_loop_run (fixture->loop);
1371
1372 {
1373 g_autoptr (GError) error = NULL;
1374
1375 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1376 g_assert_no_error (error);
1377 }
1378
1379 photos_test_pipeline_check_empty (pipeline, parent);
1380 }
1381
1382
1383 static void
photos_test_pipeline_with_parent_blank_uris_9(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1384 photos_test_pipeline_with_parent_blank_uris_9 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1385 {
1386 g_autoptr (GeglNode) parent = NULL;
1387 g_autoptr (PhotosPipeline) pipeline = NULL;
1388 const gchar *const uris[] = { "", "this-should-not-be-used", NULL };
1389
1390 parent = gegl_node_new ();
1391 photos_pipeline_new_async (parent, uris, NULL, photos_test_pipeline_async, fixture);
1392 g_main_loop_run (fixture->loop);
1393
1394 {
1395 g_autoptr (GError) error = NULL;
1396
1397 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1398 g_assert_no_error (error);
1399 }
1400
1401 photos_test_pipeline_check_empty (pipeline, parent);
1402 }
1403
1404
1405 static void
photos_test_pipeline_with_parent_null_uris(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1406 photos_test_pipeline_with_parent_null_uris (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1407 {
1408 g_autoptr (GeglNode) parent = NULL;
1409 g_autoptr (PhotosPipeline) pipeline = NULL;
1410
1411 parent = gegl_node_new ();
1412 photos_pipeline_new_async (parent, NULL, NULL, photos_test_pipeline_async, fixture);
1413 g_main_loop_run (fixture->loop);
1414
1415 {
1416 g_autoptr (GError) error = NULL;
1417
1418 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1419 g_assert_no_error (error);
1420 }
1421
1422 photos_test_pipeline_check_empty (pipeline, parent);
1423 }
1424
1425
1426 static void
photos_test_pipeline_with_parent_with_uris_0(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1427 photos_test_pipeline_with_parent_with_uris_0 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1428 {
1429 g_autoptr (GeglNode) parent = NULL;
1430 g_autoptr (PhotosPipeline) pipeline = NULL;
1431 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", NULL };
1432
1433 parent = gegl_node_new ();
1434 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1435 g_main_loop_run (fixture->loop);
1436
1437 {
1438 g_autoptr (GError) error = NULL;
1439
1440 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1441 g_assert_no_error (error);
1442 }
1443
1444 photos_test_pipeline_check_empty (pipeline, parent);
1445 }
1446
1447
1448 static void
photos_test_pipeline_with_parent_with_uris_1(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1449 photos_test_pipeline_with_parent_with_uris_1 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1450 {
1451 g_autoptr (GeglNode) parent = NULL;
1452 g_autoptr (PhotosPipeline) pipeline = NULL;
1453 const gchar *const filenames[] =
1454 {
1455 "photos-test-pipeline-not-edited-00.xml",
1456 "photos-test-pipeline-edited-00.xml",
1457 NULL
1458 };
1459
1460 parent = gegl_node_new ();
1461 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1462 g_main_loop_run (fixture->loop);
1463
1464 {
1465 g_autoptr (GError) error = NULL;
1466
1467 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1468 g_assert_no_error (error);
1469 }
1470
1471 photos_test_pipeline_check_empty (pipeline, parent);
1472 }
1473
1474
1475 static void
photos_test_pipeline_with_parent_with_uris_2(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1476 photos_test_pipeline_with_parent_with_uris_2 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1477 {
1478 g_autoptr (GeglNode) parent = NULL;
1479 g_autoptr (PhotosPipeline) pipeline = NULL;
1480 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", "this-does-not-exist", NULL };
1481
1482 parent = gegl_node_new ();
1483 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1484 g_main_loop_run (fixture->loop);
1485
1486 {
1487 g_autoptr (GError) error = NULL;
1488
1489 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1490 g_assert_no_error (error);
1491 }
1492
1493 photos_test_pipeline_check_empty (pipeline, parent);
1494 }
1495
1496
1497 static void
photos_test_pipeline_with_parent_with_uris_3(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1498 photos_test_pipeline_with_parent_with_uris_3 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1499 {
1500 g_autoptr (GeglNode) parent = NULL;
1501 g_autoptr (PhotosPipeline) pipeline = NULL;
1502 const gchar *const filenames[] = { "photos-test-pipeline-not-edited-00.xml", "this-should-not-be-used", NULL };
1503
1504 parent = gegl_node_new ();
1505 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1506 g_main_loop_run (fixture->loop);
1507
1508 {
1509 g_autoptr (GError) error = NULL;
1510
1511 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1512 g_assert_no_error (error);
1513 }
1514
1515 photos_test_pipeline_check_empty (pipeline, parent);
1516 }
1517
1518
1519 static void
photos_test_pipeline_with_parent_with_uris_4(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1520 photos_test_pipeline_with_parent_with_uris_4 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1521 {
1522 g_autoptr (GeglNode) parent = NULL;
1523 g_autoptr (PhotosPipeline) pipeline = NULL;
1524 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", NULL };
1525
1526 parent = gegl_node_new ();
1527 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1528 g_main_loop_run (fixture->loop);
1529
1530 {
1531 g_autoptr (GError) error = NULL;
1532
1533 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1534 g_assert_no_error (error);
1535 }
1536
1537 photos_test_pipeline_check_full (pipeline, parent);
1538 }
1539
1540
1541 static void
photos_test_pipeline_with_parent_with_uris_5(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1542 photos_test_pipeline_with_parent_with_uris_5 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1543 {
1544 g_autoptr (GeglNode) parent = NULL;
1545 g_autoptr (PhotosPipeline) pipeline = NULL;
1546 const gchar *const filenames[] =
1547 {
1548 "photos-test-pipeline-edited-00.xml",
1549 "photos-test-pipeline-not-edited-00.xml",
1550 NULL
1551 };
1552
1553 parent = gegl_node_new ();
1554 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1555 g_main_loop_run (fixture->loop);
1556
1557 {
1558 g_autoptr (GError) error = NULL;
1559
1560 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1561 g_assert_no_error (error);
1562 }
1563
1564 photos_test_pipeline_check_full (pipeline, parent);
1565 }
1566
1567
1568 static void
photos_test_pipeline_with_parent_with_uris_6(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1569 photos_test_pipeline_with_parent_with_uris_6 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1570 {
1571 g_autoptr (GeglNode) parent = NULL;
1572 g_autoptr (PhotosPipeline) pipeline = NULL;
1573 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", "this-does-not-exist", NULL };
1574
1575 parent = gegl_node_new ();
1576 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1577 g_main_loop_run (fixture->loop);
1578
1579 {
1580 g_autoptr (GError) error = NULL;
1581
1582 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1583 g_assert_no_error (error);
1584 }
1585
1586 photos_test_pipeline_check_full (pipeline, parent);
1587 }
1588
1589
1590 static void
photos_test_pipeline_with_parent_with_uris_7(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1591 photos_test_pipeline_with_parent_with_uris_7 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1592 {
1593 g_autoptr (GeglNode) parent = NULL;
1594 g_autoptr (PhotosPipeline) pipeline = NULL;
1595 const gchar *const filenames[] = { "photos-test-pipeline-edited-00.xml", "this-should-not-be-used", NULL };
1596
1597 parent = gegl_node_new ();
1598 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1599 g_main_loop_run (fixture->loop);
1600
1601 {
1602 g_autoptr (GError) error = NULL;
1603
1604 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1605 g_assert_no_error (error);
1606 }
1607
1608 photos_test_pipeline_check_full (pipeline, parent);
1609 }
1610
1611
1612 static void
photos_test_pipeline_with_parent_with_uris_8(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1613 photos_test_pipeline_with_parent_with_uris_8 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1614 {
1615 g_autoptr (GeglNode) parent = NULL;
1616 g_autoptr (PhotosPipeline) pipeline = NULL;
1617 const gchar *const filenames[] = { "this-does-not-exist", NULL };
1618
1619 parent = gegl_node_new ();
1620 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1621 g_main_loop_run (fixture->loop);
1622
1623 {
1624 g_autoptr (GError) error = NULL;
1625
1626 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1627 g_assert_no_error (error);
1628 }
1629
1630 photos_test_pipeline_check_empty (pipeline, parent);
1631 }
1632
1633
1634 static void
photos_test_pipeline_with_parent_with_uris_9(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1635 photos_test_pipeline_with_parent_with_uris_9 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1636 {
1637 g_autoptr (GeglNode) parent = NULL;
1638 g_autoptr (PhotosPipeline) pipeline = NULL;
1639 const gchar *const filenames[] = { "this-does-not-exist", "photos-test-pipeline-not-edited-00.xml", NULL };
1640
1641 parent = gegl_node_new ();
1642 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1643 g_main_loop_run (fixture->loop);
1644
1645 {
1646 g_autoptr (GError) error = NULL;
1647
1648 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1649 g_assert_no_error (error);
1650 }
1651
1652 photos_test_pipeline_check_empty (pipeline, parent);
1653 }
1654
1655
1656 static void
photos_test_pipeline_with_parent_with_uris_10(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1657 photos_test_pipeline_with_parent_with_uris_10 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1658 {
1659 g_autoptr (GeglNode) parent = NULL;
1660 g_autoptr (PhotosPipeline) pipeline = NULL;
1661 const gchar *const filenames[] = { "this-does-not-exist", "photos-test-pipeline-edited-00.xml", NULL };
1662
1663 parent = gegl_node_new ();
1664 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1665 g_main_loop_run (fixture->loop);
1666
1667 {
1668 g_autoptr (GError) error = NULL;
1669
1670 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1671 g_assert_no_error (error);
1672 }
1673
1674 photos_test_pipeline_check_full (pipeline, parent);
1675 }
1676
1677
1678 static void
photos_test_pipeline_with_parent_with_uris_11(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1679 photos_test_pipeline_with_parent_with_uris_11 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1680 {
1681 g_autoptr (GeglNode) parent = NULL;
1682 g_autoptr (PhotosPipeline) pipeline = NULL;
1683 const gchar *const filenames[] = { "this-does-not-exist", "this-does-not-exist-either", NULL };
1684
1685 parent = gegl_node_new ();
1686 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1687 g_main_loop_run (fixture->loop);
1688
1689 {
1690 g_autoptr (GError) error = NULL;
1691
1692 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1693 g_assert_no_error (error);
1694 }
1695
1696 photos_test_pipeline_check_empty (pipeline, parent);
1697 }
1698
1699
1700 static void
photos_test_pipeline_with_parent_with_uris_12(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1701 photos_test_pipeline_with_parent_with_uris_12 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1702 {
1703 g_autoptr (GeglNode) parent = NULL;
1704 g_autoptr (PhotosPipeline) pipeline = NULL;
1705 const gchar *const filenames[] = { "this-does-not-exist", "this-should-not-be-used", NULL };
1706
1707 parent = gegl_node_new ();
1708 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1709 g_main_loop_run (fixture->loop);
1710
1711 {
1712 g_autoptr (GError) error = NULL;
1713
1714 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1715 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1716 }
1717
1718 g_assert_null (pipeline);
1719 }
1720
1721
1722 static void
photos_test_pipeline_with_parent_with_uris_13(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1723 photos_test_pipeline_with_parent_with_uris_13 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1724 {
1725 g_autoptr (GeglNode) parent = NULL;
1726 g_autoptr (PhotosPipeline) pipeline = NULL;
1727 const gchar *const filenames[] = { "this-should-not-be-used", NULL };
1728
1729 parent = gegl_node_new ();
1730 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1731 g_main_loop_run (fixture->loop);
1732
1733 {
1734 g_autoptr (GError) error = NULL;
1735
1736 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1737 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1738 }
1739
1740 g_assert_null (pipeline);
1741 }
1742
1743
1744 static void
photos_test_pipeline_with_parent_with_uris_14(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1745 photos_test_pipeline_with_parent_with_uris_14 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1746 {
1747 g_autoptr (GeglNode) parent = NULL;
1748 g_autoptr (PhotosPipeline) pipeline = NULL;
1749 const gchar *const filenames[] = { "this-should-not-be-used", "photos-test-pipeline-not-edited-00.xml", NULL };
1750
1751 parent = gegl_node_new ();
1752 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1753 g_main_loop_run (fixture->loop);
1754
1755 {
1756 g_autoptr (GError) error = NULL;
1757
1758 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1759 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1760 }
1761
1762 g_assert_null (pipeline);
1763 }
1764
1765
1766 static void
photos_test_pipeline_with_parent_with_uris_15(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1767 photos_test_pipeline_with_parent_with_uris_15 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1768 {
1769 g_autoptr (GeglNode) parent = NULL;
1770 g_autoptr (PhotosPipeline) pipeline = NULL;
1771 const gchar *const filenames[] = { "this-should-not-be-used", "photos-test-pipeline-edited-00.xml", NULL };
1772
1773 parent = gegl_node_new ();
1774 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1775 g_main_loop_run (fixture->loop);
1776
1777 {
1778 g_autoptr (GError) error = NULL;
1779
1780 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1781 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1782 }
1783
1784 g_assert_null (pipeline);
1785 }
1786
1787
1788 static void
photos_test_pipeline_with_parent_with_uris_16(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1789 photos_test_pipeline_with_parent_with_uris_16 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1790 {
1791 g_autoptr (GeglNode) parent = NULL;
1792 g_autoptr (PhotosPipeline) pipeline = NULL;
1793 const gchar *const filenames[] = { "this-should-not-be-used", "this-does-not-exist", NULL };
1794
1795 parent = gegl_node_new ();
1796 photos_test_pipeline_pipeline_new_async (parent, filenames, NULL, photos_test_pipeline_async, fixture);
1797 g_main_loop_run (fixture->loop);
1798
1799 {
1800 g_autoptr (GError) error = NULL;
1801
1802 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1803 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1804 }
1805
1806 g_assert_null (pipeline);
1807 }
1808
1809
1810 static void
photos_test_pipeline_with_parent_with_uris_17(PhotosTestPipelineFixture * fixture,gconstpointer user_data)1811 photos_test_pipeline_with_parent_with_uris_17 (PhotosTestPipelineFixture *fixture, gconstpointer user_data)
1812 {
1813 g_autoptr (GeglNode) parent = NULL;
1814 g_autoptr (PhotosPipeline) pipeline = NULL;
1815 const gchar *const uris[] = { "this-should-not-be-used", "this-should-not-be-used-either", NULL };
1816
1817 parent = gegl_node_new ();
1818 photos_pipeline_new_async (parent, uris, NULL, photos_test_pipeline_async, fixture);
1819 g_main_loop_run (fixture->loop);
1820
1821 {
1822 g_autoptr (GError) error = NULL;
1823
1824 pipeline = photos_pipeline_new_finish (fixture->res, &error);
1825 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
1826 }
1827
1828 g_assert_null (pipeline);
1829 }
1830
1831
1832 gint
main(gint argc,gchar * argv[])1833 main (gint argc, gchar *argv[])
1834 {
1835 gint exit_status;
1836
1837 setlocale (LC_ALL, "");
1838 g_test_init (&argc, &argv, NULL);
1839 photos_debug_init ();
1840 photos_gegl_init ();
1841 photos_gegl_ensure_builtins ();
1842
1843 g_test_add ("/pipeline/new/insta-filter-none",
1844 PhotosTestPipelineFixture,
1845 NULL,
1846 photos_test_pipeline_setup,
1847 photos_test_pipeline_insta_filter_none,
1848 photos_test_pipeline_teardown);
1849
1850 g_test_add ("/pipeline/new/insta-filter-1977",
1851 PhotosTestPipelineFixture,
1852 NULL,
1853 photos_test_pipeline_setup,
1854 photos_test_pipeline_insta_filter_1977,
1855 photos_test_pipeline_teardown);
1856
1857 g_test_add ("/pipeline/new/insta-filter-brannan",
1858 PhotosTestPipelineFixture,
1859 NULL,
1860 photos_test_pipeline_setup,
1861 photos_test_pipeline_insta_filter_brannan,
1862 photos_test_pipeline_teardown);
1863
1864 g_test_add ("/pipeline/new/insta-filter-clarendon",
1865 PhotosTestPipelineFixture,
1866 NULL,
1867 photos_test_pipeline_setup,
1868 photos_test_pipeline_insta_filter_clarendon,
1869 photos_test_pipeline_teardown);
1870
1871 g_test_add ("/pipeline/new/insta-filter-gotham",
1872 PhotosTestPipelineFixture,
1873 NULL,
1874 photos_test_pipeline_setup,
1875 photos_test_pipeline_insta_filter_gotham,
1876 photos_test_pipeline_teardown);
1877
1878 g_test_add ("/pipeline/new/insta-filter-hefe",
1879 PhotosTestPipelineFixture,
1880 NULL,
1881 photos_test_pipeline_setup,
1882 photos_test_pipeline_insta_filter_hefe,
1883 photos_test_pipeline_teardown);
1884
1885 g_test_add ("/pipeline/new/insta-filter-nashville",
1886 PhotosTestPipelineFixture,
1887 NULL,
1888 photos_test_pipeline_setup,
1889 photos_test_pipeline_insta_filter_nashville,
1890 photos_test_pipeline_teardown);
1891
1892 g_test_add ("/pipeline/new/magic-filter-none",
1893 PhotosTestPipelineFixture,
1894 NULL,
1895 photos_test_pipeline_setup,
1896 photos_test_pipeline_magic_filter_none,
1897 photos_test_pipeline_teardown);
1898
1899 g_test_add ("/pipeline/new/magic-filter-1947",
1900 PhotosTestPipelineFixture,
1901 NULL,
1902 photos_test_pipeline_setup,
1903 photos_test_pipeline_magic_filter_1947,
1904 photos_test_pipeline_teardown);
1905
1906 g_test_add ("/pipeline/new/magic-filter-calistoga",
1907 PhotosTestPipelineFixture,
1908 NULL,
1909 photos_test_pipeline_setup,
1910 photos_test_pipeline_magic_filter_calistoga,
1911 photos_test_pipeline_teardown);
1912
1913 g_test_add ("/pipeline/new/magic-filter-trencin",
1914 PhotosTestPipelineFixture,
1915 NULL,
1916 photos_test_pipeline_setup,
1917 photos_test_pipeline_magic_filter_trencin,
1918 photos_test_pipeline_teardown);
1919
1920 g_test_add ("/pipeline/new/magic-filter-mogadishu",
1921 PhotosTestPipelineFixture,
1922 NULL,
1923 photos_test_pipeline_setup,
1924 photos_test_pipeline_magic_filter_mogadishu,
1925 photos_test_pipeline_teardown);
1926
1927 g_test_add ("/pipeline/new/magic-filter-caap",
1928 PhotosTestPipelineFixture,
1929 NULL,
1930 photos_test_pipeline_setup,
1931 photos_test_pipeline_magic_filter_caap,
1932 photos_test_pipeline_teardown);
1933
1934 g_test_add ("/pipeline/new/magic-filter-hometown",
1935 PhotosTestPipelineFixture,
1936 NULL,
1937 photos_test_pipeline_setup,
1938 photos_test_pipeline_magic_filter_hometown,
1939 photos_test_pipeline_teardown);
1940
1941 g_test_add ("/pipeline/new/no-parent-blank-uris-0",
1942 PhotosTestPipelineFixture,
1943 NULL,
1944 photos_test_pipeline_setup,
1945 photos_test_pipeline_no_parent_blank_uris_0,
1946 photos_test_pipeline_teardown);
1947
1948 g_test_add ("/pipeline/new/no-parent-blank-uris-1",
1949 PhotosTestPipelineFixture,
1950 NULL,
1951 photos_test_pipeline_setup,
1952 photos_test_pipeline_no_parent_blank_uris_1,
1953 photos_test_pipeline_teardown);
1954
1955 g_test_add ("/pipeline/new/no-parent-blank-uris-2",
1956 PhotosTestPipelineFixture,
1957 NULL,
1958 photos_test_pipeline_setup,
1959 photos_test_pipeline_no_parent_blank_uris_2,
1960 photos_test_pipeline_teardown);
1961
1962 g_test_add ("/pipeline/new/no-parent-blank-uris-3",
1963 PhotosTestPipelineFixture,
1964 NULL,
1965 photos_test_pipeline_setup,
1966 photos_test_pipeline_no_parent_blank_uris_3,
1967 photos_test_pipeline_teardown);
1968
1969 g_test_add ("/pipeline/new/no-parent-blank-uris-4",
1970 PhotosTestPipelineFixture,
1971 NULL,
1972 photos_test_pipeline_setup,
1973 photos_test_pipeline_no_parent_blank_uris_4,
1974 photos_test_pipeline_teardown);
1975
1976 g_test_add ("/pipeline/new/no-parent-blank-uris-5",
1977 PhotosTestPipelineFixture,
1978 NULL,
1979 photos_test_pipeline_setup,
1980 photos_test_pipeline_no_parent_blank_uris_5,
1981 photos_test_pipeline_teardown);
1982
1983 g_test_add ("/pipeline/new/no-parent-blank-uris-6",
1984 PhotosTestPipelineFixture,
1985 NULL,
1986 photos_test_pipeline_setup,
1987 photos_test_pipeline_no_parent_blank_uris_6,
1988 photos_test_pipeline_teardown);
1989
1990 g_test_add ("/pipeline/new/no-parent-blank-uris-7",
1991 PhotosTestPipelineFixture,
1992 NULL,
1993 photos_test_pipeline_setup,
1994 photos_test_pipeline_no_parent_blank_uris_7,
1995 photos_test_pipeline_teardown);
1996
1997 g_test_add ("/pipeline/new/no-parent-blank-uris-8",
1998 PhotosTestPipelineFixture,
1999 NULL,
2000 photos_test_pipeline_setup,
2001 photos_test_pipeline_no_parent_blank_uris_8,
2002 photos_test_pipeline_teardown);
2003
2004 g_test_add ("/pipeline/new/no-parent-blank-uris-9",
2005 PhotosTestPipelineFixture,
2006 NULL,
2007 photos_test_pipeline_setup,
2008 photos_test_pipeline_no_parent_blank_uris_9,
2009 photos_test_pipeline_teardown);
2010
2011 g_test_add ("/pipeline/new/no-parent-null-uris",
2012 PhotosTestPipelineFixture,
2013 NULL,
2014 photos_test_pipeline_setup,
2015 photos_test_pipeline_no_parent_null_uris,
2016 photos_test_pipeline_teardown);
2017
2018 g_test_add ("/pipeline/new/no-parent-with-uris-0",
2019 PhotosTestPipelineFixture,
2020 NULL,
2021 photos_test_pipeline_setup,
2022 photos_test_pipeline_no_parent_with_uris_0,
2023 photos_test_pipeline_teardown);
2024
2025 g_test_add ("/pipeline/new/no-parent-with-uris-1",
2026 PhotosTestPipelineFixture,
2027 NULL,
2028 photos_test_pipeline_setup,
2029 photos_test_pipeline_no_parent_with_uris_1,
2030 photos_test_pipeline_teardown);
2031
2032 g_test_add ("/pipeline/new/no-parent-with-uris-2",
2033 PhotosTestPipelineFixture,
2034 NULL,
2035 photos_test_pipeline_setup,
2036 photos_test_pipeline_no_parent_with_uris_2,
2037 photos_test_pipeline_teardown);
2038
2039 g_test_add ("/pipeline/new/no-parent-with-uris-3",
2040 PhotosTestPipelineFixture,
2041 NULL,
2042 photos_test_pipeline_setup,
2043 photos_test_pipeline_no_parent_with_uris_3,
2044 photos_test_pipeline_teardown);
2045
2046 g_test_add ("/pipeline/new/no-parent-with-uris-4",
2047 PhotosTestPipelineFixture,
2048 NULL,
2049 photos_test_pipeline_setup,
2050 photos_test_pipeline_no_parent_with_uris_4,
2051 photos_test_pipeline_teardown);
2052
2053 g_test_add ("/pipeline/new/no-parent-with-uris-5",
2054 PhotosTestPipelineFixture,
2055 NULL,
2056 photos_test_pipeline_setup,
2057 photos_test_pipeline_no_parent_with_uris_5,
2058 photos_test_pipeline_teardown);
2059
2060 g_test_add ("/pipeline/new/no-parent-with-uris-6",
2061 PhotosTestPipelineFixture,
2062 NULL,
2063 photos_test_pipeline_setup,
2064 photos_test_pipeline_no_parent_with_uris_6,
2065 photos_test_pipeline_teardown);
2066
2067 g_test_add ("/pipeline/new/no-parent-with-uris-7",
2068 PhotosTestPipelineFixture,
2069 NULL,
2070 photos_test_pipeline_setup,
2071 photos_test_pipeline_no_parent_with_uris_7,
2072 photos_test_pipeline_teardown);
2073
2074 g_test_add ("/pipeline/new/no-parent-with-uris-8",
2075 PhotosTestPipelineFixture,
2076 NULL,
2077 photos_test_pipeline_setup,
2078 photos_test_pipeline_no_parent_with_uris_8,
2079 photos_test_pipeline_teardown);
2080
2081 g_test_add ("/pipeline/new/no-parent-with-uris-9",
2082 PhotosTestPipelineFixture,
2083 NULL,
2084 photos_test_pipeline_setup,
2085 photos_test_pipeline_no_parent_with_uris_9,
2086 photos_test_pipeline_teardown);
2087
2088 g_test_add ("/pipeline/new/no-parent-with-uris-10",
2089 PhotosTestPipelineFixture,
2090 NULL,
2091 photos_test_pipeline_setup,
2092 photos_test_pipeline_no_parent_with_uris_10,
2093 photos_test_pipeline_teardown);
2094
2095 g_test_add ("/pipeline/new/no-parent-with-uris-11",
2096 PhotosTestPipelineFixture,
2097 NULL,
2098 photos_test_pipeline_setup,
2099 photos_test_pipeline_no_parent_with_uris_11,
2100 photos_test_pipeline_teardown);
2101
2102 g_test_add ("/pipeline/new/no-parent-with-uris-12",
2103 PhotosTestPipelineFixture,
2104 NULL,
2105 photos_test_pipeline_setup,
2106 photos_test_pipeline_no_parent_with_uris_12,
2107 photos_test_pipeline_teardown);
2108
2109 g_test_add ("/pipeline/new/no-parent-with-uris-13",
2110 PhotosTestPipelineFixture,
2111 NULL,
2112 photos_test_pipeline_setup,
2113 photos_test_pipeline_no_parent_with_uris_13,
2114 photos_test_pipeline_teardown);
2115
2116 g_test_add ("/pipeline/new/no-parent-with-uris-14",
2117 PhotosTestPipelineFixture,
2118 NULL,
2119 photos_test_pipeline_setup,
2120 photos_test_pipeline_no_parent_with_uris_14,
2121 photos_test_pipeline_teardown);
2122
2123 g_test_add ("/pipeline/new/no-parent-with-uris-15",
2124 PhotosTestPipelineFixture,
2125 NULL,
2126 photos_test_pipeline_setup,
2127 photos_test_pipeline_no_parent_with_uris_15,
2128 photos_test_pipeline_teardown);
2129
2130 g_test_add ("/pipeline/new/no-parent-with-uris-16",
2131 PhotosTestPipelineFixture,
2132 NULL,
2133 photos_test_pipeline_setup,
2134 photos_test_pipeline_no_parent_with_uris_16,
2135 photos_test_pipeline_teardown);
2136
2137 g_test_add ("/pipeline/new/no-parent-with-uris-17",
2138 PhotosTestPipelineFixture,
2139 NULL,
2140 photos_test_pipeline_setup,
2141 photos_test_pipeline_no_parent_with_uris_17,
2142 photos_test_pipeline_teardown);
2143
2144 g_test_add ("/pipeline/new/with-parent-blank-uris-0",
2145 PhotosTestPipelineFixture,
2146 NULL,
2147 photos_test_pipeline_setup,
2148 photos_test_pipeline_with_parent_blank_uris_0,
2149 photos_test_pipeline_teardown);
2150
2151 g_test_add ("/pipeline/new/with-parent-blank-uris-1",
2152 PhotosTestPipelineFixture,
2153 NULL,
2154 photos_test_pipeline_setup,
2155 photos_test_pipeline_with_parent_blank_uris_1,
2156 photos_test_pipeline_teardown);
2157
2158 g_test_add ("/pipeline/new/with-parent-blank-uris-2",
2159 PhotosTestPipelineFixture,
2160 NULL,
2161 photos_test_pipeline_setup,
2162 photos_test_pipeline_with_parent_blank_uris_2,
2163 photos_test_pipeline_teardown);
2164
2165 g_test_add ("/pipeline/new/with-parent-blank-uris-3",
2166 PhotosTestPipelineFixture,
2167 NULL,
2168 photos_test_pipeline_setup,
2169 photos_test_pipeline_with_parent_blank_uris_3,
2170 photos_test_pipeline_teardown);
2171
2172 g_test_add ("/pipeline/new/with-parent-blank-uris-4",
2173 PhotosTestPipelineFixture,
2174 NULL,
2175 photos_test_pipeline_setup,
2176 photos_test_pipeline_with_parent_blank_uris_4,
2177 photos_test_pipeline_teardown);
2178
2179 g_test_add ("/pipeline/new/with-parent-blank-uris-5",
2180 PhotosTestPipelineFixture,
2181 NULL,
2182 photos_test_pipeline_setup,
2183 photos_test_pipeline_with_parent_blank_uris_5,
2184 photos_test_pipeline_teardown);
2185
2186 g_test_add ("/pipeline/new/with-parent-blank-uris-6",
2187 PhotosTestPipelineFixture,
2188 NULL,
2189 photos_test_pipeline_setup,
2190 photos_test_pipeline_with_parent_blank_uris_6,
2191 photos_test_pipeline_teardown);
2192
2193 g_test_add ("/pipeline/new/with-parent-blank-uris-7",
2194 PhotosTestPipelineFixture,
2195 NULL,
2196 photos_test_pipeline_setup,
2197 photos_test_pipeline_with_parent_blank_uris_7,
2198 photos_test_pipeline_teardown);
2199
2200 g_test_add ("/pipeline/new/with-parent-blank-uris-8",
2201 PhotosTestPipelineFixture,
2202 NULL,
2203 photos_test_pipeline_setup,
2204 photos_test_pipeline_with_parent_blank_uris_8,
2205 photos_test_pipeline_teardown);
2206
2207 g_test_add ("/pipeline/new/with-parent-blank-uris-9",
2208 PhotosTestPipelineFixture,
2209 NULL,
2210 photos_test_pipeline_setup,
2211 photos_test_pipeline_with_parent_blank_uris_9,
2212 photos_test_pipeline_teardown);
2213
2214 g_test_add ("/pipeline/new/with-parent-null-uris",
2215 PhotosTestPipelineFixture,
2216 NULL,
2217 photos_test_pipeline_setup,
2218 photos_test_pipeline_with_parent_null_uris,
2219 photos_test_pipeline_teardown);
2220
2221 g_test_add ("/pipeline/new/with-parent-with-uris-0",
2222 PhotosTestPipelineFixture,
2223 NULL,
2224 photos_test_pipeline_setup,
2225 photos_test_pipeline_with_parent_with_uris_0,
2226 photos_test_pipeline_teardown);
2227
2228 g_test_add ("/pipeline/new/with-parent-with-uris-1",
2229 PhotosTestPipelineFixture,
2230 NULL,
2231 photos_test_pipeline_setup,
2232 photos_test_pipeline_with_parent_with_uris_1,
2233 photos_test_pipeline_teardown);
2234
2235 g_test_add ("/pipeline/new/with-parent-with-uris-2",
2236 PhotosTestPipelineFixture,
2237 NULL,
2238 photos_test_pipeline_setup,
2239 photos_test_pipeline_with_parent_with_uris_2,
2240 photos_test_pipeline_teardown);
2241
2242 g_test_add ("/pipeline/new/with-parent-with-uris-3",
2243 PhotosTestPipelineFixture,
2244 NULL,
2245 photos_test_pipeline_setup,
2246 photos_test_pipeline_with_parent_with_uris_3,
2247 photos_test_pipeline_teardown);
2248
2249 g_test_add ("/pipeline/new/with-parent-with-uris-4",
2250 PhotosTestPipelineFixture,
2251 NULL,
2252 photos_test_pipeline_setup,
2253 photos_test_pipeline_with_parent_with_uris_4,
2254 photos_test_pipeline_teardown);
2255
2256 g_test_add ("/pipeline/new/with-parent-with-uris-5",
2257 PhotosTestPipelineFixture,
2258 NULL,
2259 photos_test_pipeline_setup,
2260 photos_test_pipeline_with_parent_with_uris_5,
2261 photos_test_pipeline_teardown);
2262
2263 g_test_add ("/pipeline/new/with-parent-with-uris-6",
2264 PhotosTestPipelineFixture,
2265 NULL,
2266 photos_test_pipeline_setup,
2267 photos_test_pipeline_with_parent_with_uris_6,
2268 photos_test_pipeline_teardown);
2269
2270 g_test_add ("/pipeline/new/with-parent-with-uris-7",
2271 PhotosTestPipelineFixture,
2272 NULL,
2273 photos_test_pipeline_setup,
2274 photos_test_pipeline_with_parent_with_uris_7,
2275 photos_test_pipeline_teardown);
2276
2277 g_test_add ("/pipeline/new/with-parent-with-uris-8",
2278 PhotosTestPipelineFixture,
2279 NULL,
2280 photos_test_pipeline_setup,
2281 photos_test_pipeline_with_parent_with_uris_8,
2282 photos_test_pipeline_teardown);
2283
2284 g_test_add ("/pipeline/new/with-parent-with-uris-9",
2285 PhotosTestPipelineFixture,
2286 NULL,
2287 photos_test_pipeline_setup,
2288 photos_test_pipeline_with_parent_with_uris_9,
2289 photos_test_pipeline_teardown);
2290
2291 g_test_add ("/pipeline/new/with-parent-with-uris-10",
2292 PhotosTestPipelineFixture,
2293 NULL,
2294 photos_test_pipeline_setup,
2295 photos_test_pipeline_with_parent_with_uris_10,
2296 photos_test_pipeline_teardown);
2297
2298 g_test_add ("/pipeline/new/with-parent-with-uris-11",
2299 PhotosTestPipelineFixture,
2300 NULL,
2301 photos_test_pipeline_setup,
2302 photos_test_pipeline_with_parent_with_uris_11,
2303 photos_test_pipeline_teardown);
2304
2305 g_test_add ("/pipeline/new/with-parent-with-uris-12",
2306 PhotosTestPipelineFixture,
2307 NULL,
2308 photos_test_pipeline_setup,
2309 photos_test_pipeline_with_parent_with_uris_12,
2310 photos_test_pipeline_teardown);
2311
2312 g_test_add ("/pipeline/new/with-parent-with-uris-13",
2313 PhotosTestPipelineFixture,
2314 NULL,
2315 photos_test_pipeline_setup,
2316 photos_test_pipeline_with_parent_with_uris_13,
2317 photos_test_pipeline_teardown);
2318
2319 g_test_add ("/pipeline/new/with-parent-with-uris-14",
2320 PhotosTestPipelineFixture,
2321 NULL,
2322 photos_test_pipeline_setup,
2323 photos_test_pipeline_with_parent_with_uris_14,
2324 photos_test_pipeline_teardown);
2325
2326 g_test_add ("/pipeline/new/with-parent-with-uris-15",
2327 PhotosTestPipelineFixture,
2328 NULL,
2329 photos_test_pipeline_setup,
2330 photos_test_pipeline_with_parent_with_uris_15,
2331 photos_test_pipeline_teardown);
2332
2333 g_test_add ("/pipeline/new/with-parent-with-uris-16",
2334 PhotosTestPipelineFixture,
2335 NULL,
2336 photos_test_pipeline_setup,
2337 photos_test_pipeline_with_parent_with_uris_16,
2338 photos_test_pipeline_teardown);
2339
2340 g_test_add ("/pipeline/new/with-parent-with-uris-17",
2341 PhotosTestPipelineFixture,
2342 NULL,
2343 photos_test_pipeline_setup,
2344 photos_test_pipeline_with_parent_with_uris_17,
2345 photos_test_pipeline_teardown);
2346
2347 exit_status = g_test_run ();
2348
2349 gegl_exit ();
2350 return exit_status;
2351 }
2352