2 * Copyright (C) 2006 Nokia Corporation.
4 * Contact: Luc Pionchon <luc.pionchon@nokia.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 #include <gtk/gtkmain.h>
27 #include "test_suites.h"
28 #include "hildon-window.h"
29 #include "hildon-note.h"
31 /* -------------------- Fixtures -------------------- */
33 static HildonNote *note = NULL;
34 static GtkWindow * n_window = NULL;
37 fx_setup_default_note ()
41 gtk_init(&argc, NULL);
43 n_window = GTK_WINDOW(hildon_window_new());
44 /* Check window object has been created properly */
45 fail_if(!HILDON_IS_WINDOW(n_window),
46 "hildon-note: Window creation failed.");
50 fx_teardown_default_note ()
52 gtk_widget_destroy (GTK_WIDGET (n_window));
55 /* -------------------- Test cases -------------------- */
57 /* ----- Test case for new_confirmation -----*/
59 * Purpose: Check that note dialog is properly created with description regular values.
61 * - Create new confirmation note with description set to TEST_STRING
62 * - Create new confirmation note with description set to "".
65 START_TEST (test_new_confirmation_regular)
67 const gchar * description = NULL;
68 const gchar * ret_description = NULL;
70 GValue enum_value={0, };
71 HildonNoteType note_type;
73 g_value_init (&value, G_TYPE_STRING);
74 g_value_init (&enum_value, G_TYPE_INT);
76 /* Test 1: create new confirmation note with description set to TEST_STRING */
77 description = TEST_STRING;
78 note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
79 fail_if(!HILDON_IS_NOTE(note),
80 "hildon-note: Creation failed with hildon_note_new_confirmation");
82 g_object_get_property(G_OBJECT (note),"description",&value);
83 ret_description = g_value_get_string (&value);
84 fail_if( strcmp (description,ret_description) != 0,
85 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
86 description,ret_description);
88 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
89 note_type = g_value_get_int(&enum_value);
90 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
91 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
93 gtk_widget_destroy (GTK_WIDGET (note));
96 /* Test 2: create new confirmation note with description set to "" */
98 note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
99 fail_if(!HILDON_IS_NOTE(note),
100 "hildon-note: Creation failed with hildon_note_new_confirmation");
102 g_object_get_property(G_OBJECT (note),"description",&value);
103 ret_description = g_value_get_string (&value);
104 fail_if( strcmp (description,ret_description) != 0,
105 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
106 description,ret_description);
108 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
109 note_type = g_value_get_int(&enum_value);
110 fail_unless( note_type == HILDON_NOTE_CONFIRMATION_TYPE,
111 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
113 gtk_widget_destroy (GTK_WIDGET (note));
117 g_value_unset(&value);
118 g_value_unset(&enum_value);
123 * Purpose: Check that note dialog is properly created with description invalid values.
125 * - Create new confirmation note with window set to NULL.
126 * - Create new confirmation note with description set to "NULL".
129 START_TEST (test_new_confirmation_invalid)
131 const gchar * ret_description = NULL;
133 GValue enum_value={0, };
134 HildonNoteType note_type;
135 HildonNote * invalid_note;
137 g_value_init (&value, G_TYPE_STRING);
138 g_value_init (&enum_value, G_TYPE_INT);
140 /* Test 1: create new confirmation note with window set to "NULL" */
141 invalid_note = HILDON_NOTE(hildon_note_new_confirmation(NULL,""));
142 fail_if(!HILDON_IS_NOTE(invalid_note),
143 "hildon-note: Creation failed with hildon_note_new_confirmation");
145 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
146 ret_description = g_value_get_string (&value);
147 fail_if( strcmp ("",ret_description) != 0,
148 "hildon-note: Empty description was not set properly on creation. Returned description: %s",
151 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
152 note_type = g_value_get_int(&enum_value);
153 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
154 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
156 gtk_widget_destroy (GTK_WIDGET (invalid_note));
159 /* Test 2: create new confirmation note with description set to "NULL" */
160 invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
161 fail_if(!HILDON_IS_NOTE(invalid_note),
162 "hildon-note: Creation failed with hildon_note_new_confirmation");
164 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
165 ret_description = g_value_get_string (&value);
166 fail_if( ret_description != NULL,
167 "hildon-note: Empty description was not set properly on creation. Returned description: %s",
170 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
171 note_type = g_value_get_int(&enum_value);
172 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
173 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
175 gtk_widget_destroy (GTK_WIDGET (invalid_note));
178 g_value_unset(&value);
179 g_value_unset(&enum_value);
183 /* ----- Test case for new_information -----*/
185 * Purpose: Check that note dialog is properly created with description regular values.
187 * - Create new information note with description set to TEST_STRING.
188 * - Create new information note with description set to "".
191 START_TEST (test_new_information_regular)
193 const gchar * description = NULL;
194 const gchar * ret_description = NULL;
196 GValue enum_value={0, };
197 HildonNoteType note_type;
199 g_value_init (&value, G_TYPE_STRING);
200 g_value_init (&enum_value, G_TYPE_INT);
202 /* Test 1: create new information note with description set to "Standard question?" */
203 description = TEST_STRING;
204 note = HILDON_NOTE(hildon_note_new_information(n_window,description));
205 fail_if(!HILDON_IS_NOTE(note),
206 "hildon-note: Creation failed with hildon_note_new_information");
208 g_object_get_property(G_OBJECT (note),"description",&value);
209 ret_description = g_value_get_string (&value);
210 fail_if( strcmp (description,ret_description) != 0,
211 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
212 description,ret_description);
214 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
215 note_type = g_value_get_int(&enum_value);
216 fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
217 "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
219 gtk_widget_destroy (GTK_WIDGET (note));
222 /* Test 2: create new information note with description set to "" */
224 note = HILDON_NOTE(hildon_note_new_information(n_window,description));
225 fail_if(!HILDON_IS_NOTE(note),
226 "hildon-note: Creation failed with hildon_note_new_information");
228 g_object_get_property(G_OBJECT (note),"description",&value);
229 ret_description = g_value_get_string (&value);
230 fail_if( strcmp (description,ret_description) != 0,
231 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
232 description,ret_description);
234 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
235 note_type = g_value_get_int(&enum_value);
236 fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
237 "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
239 gtk_widget_destroy (GTK_WIDGET (note));
242 g_value_unset(&value);
243 g_value_unset(&enum_value);
249 * Purpose: Check that note dialog is properly created with description invalid values.
251 * - Create new information note with window set to NULL.
252 * - Create new information note with description set to "NULL".
255 START_TEST (test_new_information_invalid)
257 const gchar * ret_description = NULL;
259 GValue enum_value={0, };
260 HildonNoteType note_type;
261 HildonNote * invalid_note;
263 g_value_init (&value, G_TYPE_STRING);
264 g_value_init (&enum_value, G_TYPE_INT);
266 /* Test 1: create new information note with window set to "NULL" */
267 invalid_note = HILDON_NOTE(hildon_note_new_information(NULL,""));
268 fail_if(!HILDON_IS_NOTE(invalid_note),
269 "hildon-note: Creation failed with hildon_note_new_information");
271 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
272 ret_description = g_value_get_string (&value);
273 fail_if( strcmp ("",ret_description) != 0,
274 "hildon-note: Empty description was not set properly on creation. Returned description: %s",
277 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
278 note_type = g_value_get_int(&enum_value);
279 fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
280 "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
282 gtk_widget_destroy (GTK_WIDGET (invalid_note));
285 /* Test 2: create new information note with description set to "NULL" */
286 invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
287 fail_if(!HILDON_IS_NOTE(invalid_note),
288 "hildon-note: Creation failed with hildon_note_new_information");
290 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
291 ret_description = g_value_get_string (&value);
292 fail_if( ret_description != NULL,
293 "hildon-note: Empty description was not set properly on creation. Returned description: %s",
296 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
297 note_type = g_value_get_int(&enum_value);
298 fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
299 "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
301 gtk_widget_destroy (GTK_WIDGET (invalid_note));
304 g_value_unset(&value);
305 g_value_unset(&enum_value);
309 /* ----- Test case for new_confirmation_with_icon_name -----*/
311 * Purpose: Check that note dialog is properly created with description regular values.
313 * - Create new confirmation note with description set to TEST_STRING and icon name "qgn_list_cp_calibration".
314 * - Create new confirmation note with description set to "" and icon name NULL.
317 START_TEST (test_new_confirmation_with_icon_name_regular)
319 const gchar * description = NULL;
320 const gchar * ret_description = NULL;
321 const gchar *icon_name = NULL;
322 const gchar * ret_icon_name = NULL;
324 GValue icon_name_value={0, };
325 GValue enum_value={0, };
326 HildonNoteType note_type;
328 g_value_init (&value, G_TYPE_STRING);
329 g_value_init (&icon_name_value, G_TYPE_STRING);
330 g_value_init (&enum_value, G_TYPE_INT);
332 /* Test 1: create new confirmation note with description set to TEST_STRING */
333 description = TEST_STRING;
334 icon_name="qgn_list_cp_calibration";
335 note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
336 fail_if(!HILDON_IS_NOTE(note),
337 "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
339 g_object_get_property(G_OBJECT (note),"description",&value);
340 ret_description = g_value_get_string (&value);
341 fail_if( strcmp (description,ret_description) != 0,
342 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
343 description,ret_description);
345 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
346 note_type = g_value_get_int(&enum_value);
347 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
348 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
350 g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
351 ret_icon_name = g_value_get_string (&icon_name_value);
352 fail_if( strcmp (icon_name,ret_icon_name) != 0,
353 "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
354 icon_name,ret_icon_name);
356 gtk_widget_destroy (GTK_WIDGET (note));
359 /* Test 2: create new confirmation note with description set to "" and icon name set to NULL */
362 note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
363 fail_if(!HILDON_IS_NOTE(note),
364 "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
366 g_object_get_property(G_OBJECT (note),"description",&value);
367 ret_description = g_value_get_string (&value);
368 fail_if( strcmp (description,ret_description) != 0,
369 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
370 description,ret_description);
372 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
373 note_type = g_value_get_int(&enum_value);
374 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
375 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
377 g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
378 ret_icon_name = g_value_get_string (&icon_name_value);
379 fail_if( ret_icon_name != NULL,
380 "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
381 icon_name,ret_icon_name);
383 gtk_widget_destroy (GTK_WIDGET (note));
386 g_value_unset(&value);
387 g_value_unset(&icon_name_value);
388 g_value_unset(&enum_value);
394 * Purpose: Check that note dialog is properly created with description invalid values.
396 * - Create new confirmation note with window set to NULL.
397 * - Create new confirmation note with description set to "NULL".
400 START_TEST (test_new_confirmation_with_icon_name_invalid)
402 const gchar * ret_description = NULL;
403 const gchar * ret_icon_name = NULL;
405 GValue enum_value={0, };
406 GValue icon_name_value={0, };
407 HildonNoteType note_type;
408 HildonNote * invalid_note;
410 g_value_init (&value, G_TYPE_STRING);
411 g_value_init (&icon_name_value, G_TYPE_STRING);
412 g_value_init (&enum_value, G_TYPE_INT);
414 /* Test 1: create new confirmation note with window set to "NULL" */
415 invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(NULL,"",""));
416 fail_if(!HILDON_IS_NOTE(invalid_note),
417 "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
419 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
420 ret_description = g_value_get_string (&value);
421 fail_if( strcmp ("",ret_description) != 0,
422 "hildon-note: Description "" was not set properly on creation. Returned description: %s",
425 g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
426 ret_icon_name = g_value_get_string (&icon_name_value);
427 fail_if( strcmp ("",ret_icon_name) != 0,
428 "hildon-note: Description "" was not set properly on creation. Returned description: %s",
431 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
432 note_type = g_value_get_int(&enum_value);
433 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
434 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
436 gtk_widget_destroy (GTK_WIDGET (invalid_note));
439 /* Test 2: create new confirmation note with description set to "NULL" */
440 invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"qgn_list_cp_calibration"));
441 fail_if(!HILDON_IS_NOTE(invalid_note),
442 "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
444 g_object_get_property(G_OBJECT (invalid_note),"description",&value);
445 ret_description = g_value_get_string (&value);
446 fail_if( ret_description!=NULL,
447 "hildon-note: Description \"\" was not set properly on creation. Returned description: %s",
450 g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
451 note_type = g_value_get_int(&enum_value);
452 fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
453 "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
455 g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
456 ret_icon_name = g_value_get_string (&icon_name_value);
457 fail_if( strcmp ("qgn_list_cp_calibration",ret_icon_name) != 0,
458 "hildon-note: Icon name qgn_list_cp_calibration was not set properly on creation. Returned icon name: %s",
461 gtk_widget_destroy (GTK_WIDGET (invalid_note));
464 g_value_unset(&icon_name_value);
465 g_value_unset(&value);
466 g_value_unset(&enum_value);
470 /* ----- Test case for new_cancel_with_progress_bar -----*/
473 * Purpose: Check that note dialog is properly created with description regular values.
475 * - Create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar.
476 * - Create new confirmation note with description set to "" and correct GtkProgressBar.
479 START_TEST (test_new_cancel_with_progress_bar_regular)
481 const gchar * description = NULL;
482 const gchar * ret_description = NULL;
484 GValue enum_value={0, };
485 GtkProgressBar * progress_bar=NULL;
487 HildonNoteType note_type;
489 g_value_init (&value, G_TYPE_STRING);
490 g_value_init (&enum_value, G_TYPE_INT);
492 /* Test 1: create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar */
493 description = TEST_STRING;
494 note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
495 fail_if(!HILDON_IS_NOTE(note),
496 "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
498 g_object_get_property(G_OBJECT (note),"description",&value);
499 ret_description = g_value_get_string (&value);
500 fail_if( strcmp (description,ret_description) != 0,
501 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
502 description,ret_description);
504 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
505 note_type = g_value_get_int(&enum_value);
506 fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
507 "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
509 gtk_widget_destroy (GTK_WIDGET (note));
512 /* Test 2: create new confirmation note with description set to "" */
514 progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
515 fail_if(!GTK_IS_PROGRESS_BAR(progress_bar),
516 "hildon-note: Progress bar creation failed in hildon_note_new_cancel_with_progress_bar");
518 gtk_progress_bar_set_fraction(progress_bar,0.5);
520 note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
521 fail_if(!HILDON_IS_NOTE(note),
522 "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
524 g_object_get_property(G_OBJECT (note),"description",&value);
525 ret_description = g_value_get_string (&value);
526 fail_if( strcmp (description,ret_description) != 0,
527 "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
528 description,ret_description);
530 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
531 note_type = g_value_get_int(&enum_value);
532 fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
533 "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
535 gtk_widget_destroy (GTK_WIDGET (progress_bar));
536 gtk_widget_destroy (GTK_WIDGET (note));
539 g_value_unset(&value);
540 g_value_unset(&enum_value);
545 * Purpose: Check that note dialog is properly created with description invalid values.
547 * - Create new confirmation note with description set to NULL.
548 * - Create new confirmation note with window set to NULL.
551 START_TEST (test_new_cancel_with_progress_bar_invalid)
553 const gchar * description = NULL;
554 const gchar * ret_description = NULL;
556 GValue enum_value={0, };
558 HildonNoteType note_type;
560 g_value_init (&value, G_TYPE_STRING);
561 g_value_init (&enum_value, G_TYPE_INT);
563 /* Test 1: create new confirmation note with description set to NULL */
565 note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
566 fail_if(!HILDON_IS_NOTE(note),
567 "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
569 g_object_get_property(G_OBJECT (note),"description",&value);
570 ret_description = g_value_get_string (&value);
571 fail_if( ret_description != NULL,
572 "hildon-note: NULL description was not set properly on creation",
573 description,ret_description);
575 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
576 note_type = g_value_get_int(&enum_value);
577 fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
578 "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
580 gtk_widget_destroy (GTK_WIDGET (note));
584 /* Test 2: create new confirmation note with window set to NULL */
586 note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(NULL,description,NULL));
587 fail_if(!HILDON_IS_NOTE(note),
588 "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
590 g_object_get_property(G_OBJECT (note),"description",&value);
591 ret_description = g_value_get_string (&value);
592 fail_if( strcmp(description,ret_description) != 0,
593 "hildon-note: Empty description was not set properly on creation",
594 description,ret_description);
596 g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
597 note_type = g_value_get_int(&enum_value);
598 fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
599 "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
601 gtk_widget_destroy (GTK_WIDGET (note));
604 g_value_unset(&value);
605 g_value_unset(&enum_value);
611 /* ---------- Suite creation ---------- */
612 Suite *create_hildon_note_suite()
614 /* Create the suite */
615 Suite *s = suite_create("HildonNote");
617 /* Create test cases */
618 TCase *tc1 = tcase_create("new_confirmation");
619 TCase *tc2 = tcase_create("new_confirmation_with_icon_name");
620 TCase *tc3 = tcase_create("new_information");
621 TCase *tc4 = tcase_create("new_cancel_with_progress_bar");
623 /* Create test case for hildon_note_new_confirmation and add it to the suite */
624 tcase_add_checked_fixture(tc1, fx_setup_default_note, fx_teardown_default_note);
625 tcase_add_test(tc1, test_new_confirmation_regular);
626 tcase_add_test(tc1, test_new_confirmation_invalid);
627 suite_add_tcase (s, tc1);
629 /* Create test case for hildon_note_new_confirmation_with_icon_name and add it to the suite */
630 tcase_add_checked_fixture(tc2, fx_setup_default_note, fx_teardown_default_note);
631 tcase_add_test(tc2, test_new_confirmation_with_icon_name_regular);
632 tcase_add_test(tc2, test_new_confirmation_with_icon_name_invalid);
633 suite_add_tcase (s, tc2);
635 /* Create test case for hildon_note_new_with_information and add it to the suite */
636 tcase_add_checked_fixture(tc3, fx_setup_default_note, fx_teardown_default_note);
637 tcase_add_test(tc3, test_new_information_regular);
638 tcase_add_test(tc3, test_new_information_invalid);
639 suite_add_tcase (s, tc3);
641 /* Create test case for hildon_note_new_with_progress_bar and add it to the suite */
642 tcase_add_checked_fixture(tc4, fx_setup_default_note, fx_teardown_default_note);
643 tcase_add_test(tc4, test_new_cancel_with_progress_bar_regular);
644 tcase_add_test(tc4, test_new_cancel_with_progress_bar_invalid);
645 suite_add_tcase (s, tc4);
647 /* Return created suite */