Make sure that all timeouts in HildonBanner are removed
[hildon] / tests / check-hildon-note.c
1 /*
2  * This file is a part of hildon tests
3  *
4  * Copyright (C) 2006, 2007 Nokia Corporation, all rights reserved.
5  *
6  * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation; version 2.1 of
11  * the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  *
23  */
24
25 #include <stdlib.h>
26 #include <string.h>
27 #include <check.h>
28 #include <gtk/gtkmain.h>
29 #include "test_suites.h"
30 #include <hildon/hildon-window.h>
31 #include <hildon/hildon-note.h>
32
33 /* -------------------- Fixtures -------------------- */
34
35 static HildonNote *note = NULL;
36 static GtkWindow * n_window = NULL;
37
38 static void 
39 fx_setup_default_note ()
40 {
41   int argc = 0;
42
43   gtk_init(&argc, NULL);
44
45   n_window = GTK_WINDOW(hildon_window_new());
46  /* Check window object has been created properly */
47   fail_if(!HILDON_IS_WINDOW(n_window),
48           "hildon-note: Window creation failed.");
49 }
50
51 static void 
52 fx_teardown_default_note ()
53 {
54     gtk_widget_destroy (GTK_WIDGET (n_window));
55 }
56
57 /* -------------------- Test cases -------------------- */
58
59 /* ----- Test case for new_confirmation -----*/
60 /**
61  * Purpose: Check that note dialog is properly created with description regular values. 
62  * Cases considered:
63  *    - Create new confirmation note with description set to TEST_STRING
64  *    - Create new confirmation note with description set to "".
65  *
66  */
67 START_TEST (test_new_confirmation_regular)
68 {
69   const gchar * description = NULL;
70   const gchar * ret_description = NULL;
71   GValue value={0, };
72   GValue enum_value={0, };
73   HildonNoteType note_type;
74
75   g_value_init (&value, G_TYPE_STRING);
76   g_value_init (&enum_value, G_TYPE_INT);
77
78   /* Test 1: create new confirmation note with description set to TEST_STRING */
79   description = TEST_STRING;
80   note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
81   fail_if(!HILDON_IS_NOTE(note),
82           "hildon-note: Creation failed with hildon_note_new_confirmation");
83
84   g_object_get_property(G_OBJECT (note),"description",&value);
85   ret_description = g_value_get_string (&value);
86   fail_if( strcmp (description,ret_description) != 0,
87            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
88            description,ret_description);
89     
90   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
91   note_type = g_value_get_int(&enum_value);
92   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
93            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
94
95   gtk_widget_destroy (GTK_WIDGET (note));
96   note=NULL;
97
98   /* Test 2: create new confirmation note with description set to "" */
99   description = "";
100   note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
101   fail_if(!HILDON_IS_NOTE(note),
102           "hildon-note: Creation failed with hildon_note_new_confirmation");
103
104   g_object_get_property(G_OBJECT (note),"description",&value);
105   ret_description = g_value_get_string (&value);
106   fail_if( strcmp (description,ret_description) != 0,
107            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
108            description,ret_description);
109
110   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
111   note_type = g_value_get_int(&enum_value);
112   fail_unless( note_type == HILDON_NOTE_TYPE_CONFIRMATION,
113                "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
114
115   gtk_widget_destroy (GTK_WIDGET (note));
116   note=NULL;
117
118
119   g_value_unset(&value);
120   g_value_unset(&enum_value);    
121 }
122 END_TEST
123
124 /**
125  * Purpose: Check that note dialog is properly created with description invalid values. 
126  * Cases considered:
127  *    - Create new confirmation note with window set to NULL.
128  *    - Create new confirmation note with description set to "NULL".
129  *
130  */
131 START_TEST (test_new_confirmation_invalid)
132 {
133   const gchar * ret_description = NULL;
134   GValue value={0, };
135   GValue enum_value={0, };
136   HildonNoteType note_type;
137   HildonNote * invalid_note;
138    
139   g_value_init (&value, G_TYPE_STRING);
140   g_value_init (&enum_value, G_TYPE_INT);
141
142   /* Test 1: create new confirmation note with window set to "NULL" */
143   invalid_note = HILDON_NOTE(hildon_note_new_confirmation(NULL,""));
144   fail_if(!HILDON_IS_NOTE(invalid_note),
145           "hildon-note: Creation failed with hildon_note_new_confirmation");
146
147   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
148   ret_description = g_value_get_string (&value);
149   fail_if( strcmp ("",ret_description) != 0,
150            "hildon-note: Empty description was not set properly on creation. Returned description: %s",
151            ret_description);
152
153   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
154   note_type = g_value_get_int(&enum_value);
155   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
156            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
157
158   gtk_widget_destroy (GTK_WIDGET (invalid_note));
159   invalid_note=NULL;
160
161   /* Test 2: create new confirmation note with description set to "NULL" */
162   invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
163   fail_if(HILDON_IS_NOTE(invalid_note),
164           "hildon-note: Creation succeeded with hildon_note_new_confirmation with NULL description");
165
166   g_value_unset(&value);
167   g_value_unset(&enum_value);
168 }
169 END_TEST
170
171 /* ----- Test case for new_information -----*/
172 /**
173  * Purpose: Check that note dialog is properly created with description regular values. 
174  * Cases considered:
175  *    - Create new information note with description set to TEST_STRING.
176  *    - Create new information note with description set to "".
177  *
178  */
179 START_TEST (test_new_information_regular)
180 {
181   const gchar * description = NULL;
182   const gchar * ret_description = NULL;
183   GValue value={0, };
184   GValue enum_value={0, };
185   HildonNoteType note_type;
186
187   g_value_init (&value, G_TYPE_STRING);
188   g_value_init (&enum_value, G_TYPE_INT);
189
190   /* Test 1: create new information note with description set to "Standard question?" */
191   description = TEST_STRING;
192   note = HILDON_NOTE(hildon_note_new_information(n_window,description));
193   fail_if(!HILDON_IS_NOTE(note),
194           "hildon-note: Creation failed with hildon_note_new_information");
195
196   g_object_get_property(G_OBJECT (note),"description",&value);
197   ret_description = g_value_get_string (&value);
198   fail_if( strcmp (description,ret_description) != 0,
199            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
200            description,ret_description);
201
202   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
203   note_type = g_value_get_int(&enum_value);   
204   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
205            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
206
207   gtk_widget_destroy (GTK_WIDGET (note));
208   note=NULL;
209
210   /* Test 2: create new information note with description set to "" */
211   description = "";
212   note = HILDON_NOTE(hildon_note_new_information(n_window,description));
213   fail_if(!HILDON_IS_NOTE(note),
214           "hildon-note: Creation failed with hildon_note_new_information");
215
216   g_object_get_property(G_OBJECT (note),"description",&value);
217   ret_description = g_value_get_string (&value);
218   fail_if( strcmp (description,ret_description) != 0,
219            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
220            description,ret_description);
221
222   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
223   note_type = g_value_get_int(&enum_value);
224   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
225            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
226
227   gtk_widget_destroy (GTK_WIDGET (note));
228   note=NULL;
229
230   g_value_unset(&value);
231   g_value_unset(&enum_value);       
232 }
233 END_TEST
234
235   
236 /**
237  * Purpose: Check that note dialog is properly created with description invalid values. 
238  * Cases considered:
239  *    - Create new information note with window set to NULL.
240  *    - Create new information note with description set to "NULL".
241  *
242  */
243 START_TEST (test_new_information_invalid)
244 {
245   const gchar * ret_description = NULL;
246   GValue value={0, };
247   GValue enum_value={0, };
248   HildonNoteType note_type;
249   HildonNote * invalid_note;
250    
251   g_value_init (&value, G_TYPE_STRING);
252   g_value_init (&enum_value, G_TYPE_INT);
253
254   /* Test 1: create new information note with window set to "NULL" */
255   invalid_note = HILDON_NOTE(hildon_note_new_information(NULL,""));
256   fail_if(!HILDON_IS_NOTE(invalid_note),
257           "hildon-note: Creation failed with hildon_note_new_information");
258
259   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
260   ret_description = g_value_get_string (&value);
261   fail_if( strcmp ("",ret_description) != 0,
262            "hildon-note: Empty description was not set properly on creation. Returned description: %s",
263            ret_description);
264
265   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
266   note_type = g_value_get_int(&enum_value);
267   fail_if( note_type != HILDON_NOTE_TYPE_INFORMATION_THEME,
268            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_INFORMATION_THEME)",note_type);
269     
270   gtk_widget_destroy (GTK_WIDGET (invalid_note));
271   invalid_note=NULL;
272
273   /* Test 2: create new information note with description set to "NULL" */
274   invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
275   fail_if(HILDON_IS_NOTE(invalid_note),
276           "hildon-note: Creation succeeded with hildon_note_new_information where msg == NULL");
277
278   g_value_unset(&value);
279   g_value_unset(&enum_value);
280 }
281 END_TEST
282
283 #ifndef HILDON_DISABLE_DEPRECATED
284 /* ----- Test case for new_confirmation_with_icon_name -----*/
285 /**
286  * Purpose: Check that note dialog is properly created with description regular values. 
287  * Cases considered:
288  *    - Create new confirmation note with description set to TEST_STRING and icon name "control_calibration_target".
289  *    - Create new confirmation note with description set to "" and icon name NULL.
290  *
291  */
292 START_TEST (test_new_confirmation_with_icon_name_regular)
293 {
294   const gchar * description = NULL;
295   const gchar * ret_description = NULL;
296   const gchar *icon_name = NULL;
297   const gchar * ret_icon_name = NULL;
298   GValue value={0, };
299   GValue icon_name_value={0, };
300   GValue enum_value={0, };
301   HildonNoteType note_type;
302
303   g_value_init (&value, G_TYPE_STRING);
304   g_value_init (&icon_name_value, G_TYPE_STRING);
305   g_value_init (&enum_value, G_TYPE_INT);
306
307   /* Test 1: create new confirmation note with description set to TEST_STRING */
308   description = TEST_STRING;
309   icon_name="control_calibration_target";
310   note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
311   fail_if(!HILDON_IS_NOTE(note),
312           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
313
314     g_object_get_property(G_OBJECT (note),"description",&value);
315   ret_description = g_value_get_string (&value);
316   fail_if( strcmp (description,ret_description) != 0,
317            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
318            description,ret_description);
319   
320   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
321   note_type = g_value_get_int(&enum_value);  
322   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
323            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
324   
325   g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
326   ret_icon_name = g_value_get_string (&icon_name_value);
327   fail_if( strcmp (icon_name,ret_icon_name) != 0,
328            "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
329            icon_name,ret_icon_name);
330
331   gtk_widget_destroy (GTK_WIDGET (note));
332   note=NULL;
333   
334   /* Test 2: create new confirmation note with description set to "" and icon name set to NULL */
335   description = "";
336   icon_name=NULL;
337   note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
338   fail_if(!HILDON_IS_NOTE(note),
339           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
340   
341   g_object_get_property(G_OBJECT (note),"description",&value);
342   ret_description = g_value_get_string (&value);
343   fail_if( strcmp (description,ret_description) != 0,
344            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
345            description,ret_description);
346   
347   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
348   note_type = g_value_get_int(&enum_value);  
349   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
350            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
351   
352   g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
353   ret_icon_name = g_value_get_string (&icon_name_value);
354   fail_if( ret_icon_name != NULL,
355            "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
356            icon_name,ret_icon_name);
357   
358   gtk_widget_destroy (GTK_WIDGET (note));
359   note=NULL;
360   
361   g_value_unset(&value);
362   g_value_unset(&icon_name_value);
363   g_value_unset(&enum_value);
364   
365 }
366 END_TEST
367
368 /**
369  * Purpose: Check that note dialog is properly created with description invalid values. 
370  * Cases considered:
371  *    - Create new confirmation note with window set to NULL.
372  *    - Create new confirmation note with description set to "NULL".
373  *
374  */
375 START_TEST (test_new_confirmation_with_icon_name_invalid)
376 {
377   const gchar * ret_description = NULL;
378   const gchar * ret_icon_name = NULL;
379   GValue value={0, };
380   GValue enum_value={0, };
381   GValue icon_name_value={0, };
382   HildonNoteType note_type;
383   HildonNote * invalid_note;
384
385   g_value_init (&value, G_TYPE_STRING);
386   g_value_init (&icon_name_value, G_TYPE_STRING);
387   g_value_init (&enum_value, G_TYPE_INT);
388
389   /* Test 1: create new confirmation note with window set to "NULL" */
390   invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(NULL,"",""));
391   fail_if(!HILDON_IS_NOTE(invalid_note),
392           "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
393
394   g_object_get_property(G_OBJECT (invalid_note),"description",&value);
395   ret_description = g_value_get_string (&value);
396   fail_if( strcmp ("",ret_description) != 0,
397            "hildon-note: Description "" was not set properly on creation. Returned description: %s",
398            ret_description);
399
400   g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
401   ret_icon_name = g_value_get_string (&icon_name_value);
402   fail_if( strcmp ("",ret_icon_name) != 0,
403            "hildon-note: Description "" was not set properly on creation. Returned description: %s",
404            ret_icon_name);
405
406   g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
407   note_type = g_value_get_int(&enum_value);
408   fail_if( note_type != HILDON_NOTE_TYPE_CONFIRMATION,
409            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_CONFIRMATION)",note_type);
410
411   gtk_widget_destroy (GTK_WIDGET (invalid_note));
412   invalid_note=NULL;
413
414   /* Test 2: create new confirmation note with description set to "NULL" */
415   invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"control_calibration_target"));
416   fail_if(HILDON_IS_NOTE(invalid_note),
417           "hildon-note: Creation succeeded with hildon_note_new_confirmation_with_icon_name with message == NULL");
418
419   g_value_unset(&icon_name_value);
420   g_value_unset(&value);
421   g_value_unset(&enum_value);
422 }
423 END_TEST
424 #endif
425
426 /* ----- Test case for new_cancel_with_progress_bar -----*/
427
428 /**
429  * Purpose: Check that note dialog is properly created with description regular values. 
430  * Cases considered:
431  *    - Create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar.
432  *    - Create new confirmation note with description set to "" and correct GtkProgressBar.
433  *
434  */
435 START_TEST (test_new_cancel_with_progress_bar_regular)
436 {
437   const gchar * description = NULL;
438   const gchar * ret_description = NULL;
439   GValue value={0, };
440   GValue enum_value={0, };
441   GtkProgressBar * progress_bar=NULL;
442    
443   HildonNoteType note_type;
444
445   g_value_init (&value, G_TYPE_STRING);
446   g_value_init (&enum_value, G_TYPE_INT);
447
448   /* Test 1: create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar */
449   description = TEST_STRING;
450   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
451   fail_if(!HILDON_IS_NOTE(note),
452           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
453
454   g_object_get_property(G_OBJECT (note),"description",&value);
455   ret_description = g_value_get_string (&value);
456   fail_if( strcmp (description,ret_description) != 0,
457            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
458            description,ret_description);
459
460   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
461   note_type = g_value_get_int(&enum_value);   
462   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
463            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
464
465   gtk_widget_destroy (GTK_WIDGET (note));
466   note=NULL;
467
468   /* Test 2: create new confirmation note with description set to "" */
469   description = "";
470   progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
471   fail_if(!GTK_IS_PROGRESS_BAR(progress_bar),
472           "hildon-note: Progress bar creation failed in hildon_note_new_cancel_with_progress_bar");
473
474   gtk_progress_bar_set_fraction(progress_bar,0.5);
475     
476   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
477   fail_if(!HILDON_IS_NOTE(note),
478           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
479
480   g_object_get_property(G_OBJECT (note),"description",&value);
481   ret_description = g_value_get_string (&value);
482   fail_if( strcmp (description,ret_description) != 0,
483            "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
484            description,ret_description);
485
486   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
487   note_type = g_value_get_int(&enum_value);   
488   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
489            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
490
491   gtk_widget_destroy (GTK_WIDGET (progress_bar));
492   gtk_widget_destroy (GTK_WIDGET (note));
493   note=NULL;
494
495   g_value_unset(&value);
496   g_value_unset(&enum_value);
497 }
498 END_TEST
499
500 /**
501  * Purpose: Check that note dialog is properly created with description invalid values. 
502  * Cases considered:
503  *    - Create new confirmation note with description set to NULL.
504  *    - Create new confirmation note with window set to NULL.
505  *
506  */
507 START_TEST (test_new_cancel_with_progress_bar_invalid)
508 {
509   const gchar * description = NULL;
510   const gchar * ret_description = NULL;
511   GValue value={0, };
512   GValue enum_value={0, };
513    
514   HildonNoteType note_type;
515
516   g_value_init (&value, G_TYPE_STRING);
517   g_value_init (&enum_value, G_TYPE_INT);
518
519   /* Test 1: create new confirmation note with description set to NULL */
520   description = NULL;
521   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
522   fail_if(HILDON_IS_NOTE(note),
523           "hildon-note: Creation succeeded with hildon_note_new_cancel_with_progress_bar where msg == NULL");
524
525   /* Test 2: create new confirmation note with window set to NULL */
526   description = "";
527   note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(NULL,description,NULL));
528   fail_if(!HILDON_IS_NOTE(note),
529           "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
530
531   g_object_get_property(G_OBJECT (note),"description",&value);
532   ret_description = g_value_get_string (&value);
533   fail_if( strcmp(description,ret_description) != 0,
534            "hildon-note: Empty description was not set properly on creation",
535            description,ret_description);
536
537   g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
538   note_type = g_value_get_int(&enum_value);
539   fail_if( note_type != HILDON_NOTE_TYPE_PROGRESSBAR,
540            "hildon-note: Type was not set property on creation (HILDON_NOTE_TYPE_PROGRESSBAR)",note_type);
541
542   gtk_widget_destroy (GTK_WIDGET (note));
543   note=NULL;
544
545   g_value_unset(&value);
546   g_value_unset(&enum_value);
547 }
548 END_TEST
549
550   
551   
552 /* ---------- Suite creation ---------- */
553 Suite *create_hildon_note_suite()
554 {
555   /* Create the suite */
556   Suite *s = suite_create("HildonNote");
557
558   /* Create test cases */
559   TCase *tc1 = tcase_create("new_confirmation");
560 #ifndef HILDON_DISABLE_DEPRECATED
561   TCase *tc2 = tcase_create("new_confirmation_with_icon_name");
562 #endif
563   TCase *tc3 = tcase_create("new_information");
564   TCase *tc4 = tcase_create("new_cancel_with_progress_bar");
565
566   /* Create test case for hildon_note_new_confirmation and add it to the suite */
567   tcase_add_checked_fixture(tc1, fx_setup_default_note, fx_teardown_default_note);
568   tcase_add_test(tc1, test_new_confirmation_regular);
569   tcase_add_test(tc1, test_new_confirmation_invalid);
570   suite_add_tcase (s, tc1);
571
572 #ifndef HILDON_DISABLE_DEPRECATED
573   /* Create test case for hildon_note_new_confirmation_with_icon_name and add it to the suite */
574   tcase_add_checked_fixture(tc2, fx_setup_default_note, fx_teardown_default_note);
575   tcase_add_test(tc2, test_new_confirmation_with_icon_name_regular);
576   tcase_add_test(tc2, test_new_confirmation_with_icon_name_invalid);
577   suite_add_tcase (s, tc2);
578 #endif
579
580   /* Create test case for hildon_note_new_with_information and add it to the suite */
581   tcase_add_checked_fixture(tc3, fx_setup_default_note, fx_teardown_default_note);
582   tcase_add_test(tc3, test_new_information_regular);
583   tcase_add_test(tc3, test_new_information_invalid);
584   suite_add_tcase (s, tc3);
585
586   /* Create test case for hildon_note_new_with_progress_bar and add it to the suite */
587   tcase_add_checked_fixture(tc4, fx_setup_default_note, fx_teardown_default_note);
588   tcase_add_test(tc4, test_new_cancel_with_progress_bar_regular);
589   tcase_add_test(tc4, test_new_cancel_with_progress_bar_invalid);
590   suite_add_tcase (s, tc4);
591
592   /* Return created suite */
593   return s;
594 }