aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>2007-01-15 16:11:13 +0000
committerMichael Dominic Kostrzewa <michael.kostrzewa@nokia.com>2007-01-15 16:11:13 +0000
commit62535c95d73315a590193c5104709a7430e5fbbc (patch)
tree3152910adbe1a735cf8d22df8f41c942b23eccf4 /tests
parente2430cc62f074506300f36f711548b25294ca146 (diff)
Adding the test suite.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am35
-rw-r--r--tests/Makefile.in1190
-rw-r--r--tests/TEST-CASES.txt4367
-rw-r--r--tests/check-hildon-banner.c244
-rw-r--r--tests/check-hildon-calendar-popup.c517
-rw-r--r--tests/check-hildon-caption.c466
-rw-r--r--tests/check-hildon-code-dialog.c127
-rw-r--r--tests/check-hildon-color-button.c376
-rw-r--r--tests/check-hildon-color-popup.c217
-rw-r--r--tests/check-hildon-color-selector.c307
-rw-r--r--tests/check-hildon-composite-widget.c169
-rw-r--r--tests/check-hildon-controlbar.c416
-rw-r--r--tests/check-hildon-date-editor.c1038
-rw-r--r--tests/check-hildon-defines.c188
-rw-r--r--tests/check-hildon-dialoghelp.c171
-rw-r--r--tests/check-hildon-find-toolbar.c186
-rw-r--r--tests/check-hildon-font-selection-dialog.c476
-rw-r--r--tests/check-hildon-get-password-dialog.c463
-rw-r--r--tests/check-hildon-name-password-dialog.c354
-rw-r--r--tests/check-hildon-note.c649
-rw-r--r--tests/check-hildon-number-editor.c239
-rw-r--r--tests/check-hildon-program.c239
-rw-r--r--tests/check-hildon-range-editor.c379
-rw-r--r--tests/check-hildon-scroll-area.c290
-rw-r--r--tests/check-hildon-seekbar.c440
-rw-r--r--tests/check-hildon-set-password-dialog.c242
-rw-r--r--tests/check-hildon-sort-dialog.c241
-rw-r--r--tests/check-hildon-system-sound.c127
-rw-r--r--tests/check-hildon-time-editor.c1421
-rw-r--r--tests/check-hildon-time-picker.c276
-rw-r--r--tests/check-hildon-volumebar-range.c195
-rw-r--r--tests/check-hildon-volumebar.c197
-rw-r--r--tests/check-hildon-weekday-picker.c264
-rw-r--r--tests/check-hildon-window.c203
-rw-r--r--tests/check-hildon-wizard-dialog.c178
-rw-r--r--tests/check_test.c169
-rw-r--r--tests/check_utils.c67
-rw-r--r--tests/check_utils.h34
-rw-r--r--tests/hildon-clock-widgets_tests.c714
-rw-r--r--tests/hildon-widgets_tests.c3206
-rwxr-xr-xtests/run_tests5
-rw-r--r--tests/tc_banner_truncate.c163
-rw-r--r--tests/test_suites.h62
43 files changed, 21307 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..e305577
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,35 @@
+if BUILD_TESTS
+
+noinst_PROGRAMS = check_test
+
+check_test_SOURCES = check_test.c \
+ check_utils.c \
+ check-hildon-range-editor.c \
+ check-hildon-date-editor.c \
+ check-hildon-time-editor.c \
+ check-hildon-weekday-picker.c \
+ check-hildon-controlbar.c \
+ check-hildon-seekbar.c \
+ check-hildon-time-picker.c \
+ check-hildon-number-editor.c \
+ check-hildon-calendar-popup.c \
+ check-hildon-caption.c \
+ check-hildon-defines.c \
+ check-hildon-code-dialog.c \
+ check-hildon-find-toolbar.c \
+ check-hildon-sort-dialog.c \
+ check-hildon-note.c \
+ check-hildon-volumebar.c \
+ check-hildon-volumebar-range.c \
+ check-hildon-banner.c \
+ check-hildon-wizard-dialog.c \
+ check-hildon-font-selection-dialog.c \
+ check-hildon-window.c \
+ check-hildon-program.c \
+ check-hildon-composite-widget.c
+
+check_test_LDADD = $(HILDON_WIDGETS_OBJ_LIBS)
+check_test_LDFLAGS = -module -avoid-version
+check_test_CFLAGS = $(HILDON_WIDGETS_OBJ_CFLAGS)
+
+endif
diff --git a/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..fabb6a2
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,1190 @@
+# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+SOURCES = $(check_test_SOURCES)
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+@BUILD_TESTS_TRUE@noinst_PROGRAMS = check_test$(EXEEXT)
+subdir = tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-libtool.m4 \
+ $(top_srcdir)/m4/as-version.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(mkdir_p)
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
+am__check_test_SOURCES_DIST = check_test.c check_utils.c \
+ check-hildon-range-editor.c check-hildon-date-editor.c \
+ check-hildon-time-editor.c check-hildon-weekday-picker.c \
+ check-hildon-controlbar.c check-hildon-seekbar.c \
+ check-hildon-time-picker.c check-hildon-number-editor.c \
+ check-hildon-calendar-popup.c check-hildon-caption.c \
+ check-hildon-defines.c check-hildon-code-dialog.c \
+ check-hildon-find-toolbar.c check-hildon-sort-dialog.c \
+ check-hildon-note.c check-hildon-volumebar.c \
+ check-hildon-volumebar-range.c check-hildon-banner.c \
+ check-hildon-wizard-dialog.c \
+ check-hildon-font-selection-dialog.c check-hildon-window.c \
+ check-hildon-program.c check-hildon-composite-widget.c
+@BUILD_TESTS_TRUE@am_check_test_OBJECTS = \
+@BUILD_TESTS_TRUE@ check_test-check_test.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check_utils.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-range-editor.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-date-editor.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-time-editor.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-weekday-picker.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-controlbar.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-seekbar.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-time-picker.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-number-editor.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-calendar-popup.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-caption.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-defines.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-code-dialog.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-find-toolbar.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-sort-dialog.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-note.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-volumebar.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-volumebar-range.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-banner.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-wizard-dialog.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-font-selection-dialog.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-window.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-program.$(OBJEXT) \
+@BUILD_TESTS_TRUE@ check_test-check-hildon-composite-widget.$(OBJEXT)
+check_test_OBJECTS = $(am_check_test_OBJECTS)
+am__DEPENDENCIES_1 =
+@BUILD_TESTS_TRUE@check_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/check_test-check-hildon-banner.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-calendar-popup.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-caption.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-code-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-composite-widget.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-controlbar.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-date-editor.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-defines.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-find-toolbar.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-note.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-number-editor.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-program.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-range-editor.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-seekbar.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-sort-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-time-editor.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-time-picker.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-volumebar-range.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-volumebar.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-weekday-picker.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-window.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check_test.Po \
+@AMDEP_TRUE@ ./$(DEPDIR)/check_test-check_utils.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(check_test_SOURCES)
+DIST_SOURCES = $(am__check_test_SOURCES_DIST)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_EXAMPLES_FALSE = @BUILD_EXAMPLES_FALSE@
+BUILD_EXAMPLES_TRUE = @BUILD_EXAMPLES_TRUE@
+BUILD_TESTS_FALSE = @BUILD_TESTS_FALSE@
+BUILD_TESTS_TRUE = @BUILD_TESTS_TRUE@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECK_CFLAGS = @CHECK_CFLAGS@
+CHECK_LIBS = @CHECK_LIBS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ESD_CFLAGS = @ESD_CFLAGS@
+ESD_LIBS = @ESD_LIBS@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GCONF_CFLAGS = @GCONF_CFLAGS@
+GCONF_LIBS = @GCONF_LIBS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_VERSION = @GTK_VERSION@
+HILDON_WIDGETS_AGE = @HILDON_WIDGETS_AGE@
+HILDON_WIDGETS_CURRENT = @HILDON_WIDGETS_CURRENT@
+HILDON_WIDGETS_LIBVERSION = @HILDON_WIDGETS_LIBVERSION@
+HILDON_WIDGETS_LT_LDFLAGS = @HILDON_WIDGETS_LT_LDFLAGS@
+HILDON_WIDGETS_OBJ_CFLAGS = @HILDON_WIDGETS_OBJ_CFLAGS@
+HILDON_WIDGETS_OBJ_LIBS = @HILDON_WIDGETS_OBJ_LIBS@
+HILDON_WIDGETS_REVISION = @HILDON_WIDGETS_REVISION@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+LDFLAGS = @LDFLAGS@
+LIBMB_CFLAGS = @LIBMB_CFLAGS@
+LIBMB_LIBS = @LIBMB_LIBS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
+PACKAGE_VERSION_MICRO = @PACKAGE_VERSION_MICRO@
+PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+RANLIB = @RANLIB@
+REBUILD = @REBUILD@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+@BUILD_TESTS_TRUE@check_test_SOURCES = check_test.c \
+@BUILD_TESTS_TRUE@ check_utils.c \
+@BUILD_TESTS_TRUE@ check-hildon-range-editor.c \
+@BUILD_TESTS_TRUE@ check-hildon-date-editor.c \
+@BUILD_TESTS_TRUE@ check-hildon-time-editor.c \
+@BUILD_TESTS_TRUE@ check-hildon-weekday-picker.c \
+@BUILD_TESTS_TRUE@ check-hildon-controlbar.c \
+@BUILD_TESTS_TRUE@ check-hildon-seekbar.c \
+@BUILD_TESTS_TRUE@ check-hildon-time-picker.c \
+@BUILD_TESTS_TRUE@ check-hildon-number-editor.c \
+@BUILD_TESTS_TRUE@ check-hildon-calendar-popup.c \
+@BUILD_TESTS_TRUE@ check-hildon-caption.c \
+@BUILD_TESTS_TRUE@ check-hildon-defines.c \
+@BUILD_TESTS_TRUE@ check-hildon-code-dialog.c \
+@BUILD_TESTS_TRUE@ check-hildon-find-toolbar.c \
+@BUILD_TESTS_TRUE@ check-hildon-sort-dialog.c \
+@BUILD_TESTS_TRUE@ check-hildon-note.c \
+@BUILD_TESTS_TRUE@ check-hildon-volumebar.c \
+@BUILD_TESTS_TRUE@ check-hildon-volumebar-range.c \
+@BUILD_TESTS_TRUE@ check-hildon-banner.c \
+@BUILD_TESTS_TRUE@ check-hildon-wizard-dialog.c \
+@BUILD_TESTS_TRUE@ check-hildon-font-selection-dialog.c \
+@BUILD_TESTS_TRUE@ check-hildon-window.c \
+@BUILD_TESTS_TRUE@ check-hildon-program.c \
+@BUILD_TESTS_TRUE@ check-hildon-composite-widget.c
+
+@BUILD_TESTS_TRUE@check_test_LDADD = $(HILDON_WIDGETS_OBJ_LIBS)
+@BUILD_TESTS_TRUE@check_test_LDFLAGS = -module -avoid-version
+@BUILD_TESTS_TRUE@check_test_CFLAGS = $(HILDON_WIDGETS_OBJ_CFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tests/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+check_test$(EXEEXT): $(check_test_OBJECTS) $(check_test_DEPENDENCIES)
+ @rm -f check_test$(EXEEXT)
+ $(LINK) $(check_test_LDFLAGS) $(check_test_OBJECTS) $(check_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-banner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-calendar-popup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-caption.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-code-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-composite-widget.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-controlbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-date-editor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-defines.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-find-toolbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-note.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-number-editor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-program.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-range-editor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-seekbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-sort-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-time-editor.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-time-picker.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-volumebar-range.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-volumebar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-weekday-picker.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-window.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check_test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_test-check_utils.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+check_test-check_test.o: check_test.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_test.o -MD -MP -MF "$(DEPDIR)/check_test-check_test.Tpo" -c -o check_test-check_test.o `test -f 'check_test.c' || echo '$(srcdir)/'`check_test.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_test.Tpo" "$(DEPDIR)/check_test-check_test.Po"; else rm -f "$(DEPDIR)/check_test-check_test.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_test.c' object='check_test-check_test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_test.Po' tmpdepfile='$(DEPDIR)/check_test-check_test.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_test.o `test -f 'check_test.c' || echo '$(srcdir)/'`check_test.c
+
+check_test-check_test.obj: check_test.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_test.obj -MD -MP -MF "$(DEPDIR)/check_test-check_test.Tpo" -c -o check_test-check_test.obj `if test -f 'check_test.c'; then $(CYGPATH_W) 'check_test.c'; else $(CYGPATH_W) '$(srcdir)/check_test.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_test.Tpo" "$(DEPDIR)/check_test-check_test.Po"; else rm -f "$(DEPDIR)/check_test-check_test.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_test.c' object='check_test-check_test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_test.Po' tmpdepfile='$(DEPDIR)/check_test-check_test.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_test.obj `if test -f 'check_test.c'; then $(CYGPATH_W) 'check_test.c'; else $(CYGPATH_W) '$(srcdir)/check_test.c'; fi`
+
+check_test-check_test.lo: check_test.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_test.lo -MD -MP -MF "$(DEPDIR)/check_test-check_test.Tpo" -c -o check_test-check_test.lo `test -f 'check_test.c' || echo '$(srcdir)/'`check_test.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_test.Tpo" "$(DEPDIR)/check_test-check_test.Plo"; else rm -f "$(DEPDIR)/check_test-check_test.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_test.c' object='check_test-check_test.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_test.Plo' tmpdepfile='$(DEPDIR)/check_test-check_test.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_test.lo `test -f 'check_test.c' || echo '$(srcdir)/'`check_test.c
+
+check_test-check_utils.o: check_utils.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_utils.o -MD -MP -MF "$(DEPDIR)/check_test-check_utils.Tpo" -c -o check_test-check_utils.o `test -f 'check_utils.c' || echo '$(srcdir)/'`check_utils.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_utils.Tpo" "$(DEPDIR)/check_test-check_utils.Po"; else rm -f "$(DEPDIR)/check_test-check_utils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_utils.c' object='check_test-check_utils.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_utils.Po' tmpdepfile='$(DEPDIR)/check_test-check_utils.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_utils.o `test -f 'check_utils.c' || echo '$(srcdir)/'`check_utils.c
+
+check_test-check_utils.obj: check_utils.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_utils.obj -MD -MP -MF "$(DEPDIR)/check_test-check_utils.Tpo" -c -o check_test-check_utils.obj `if test -f 'check_utils.c'; then $(CYGPATH_W) 'check_utils.c'; else $(CYGPATH_W) '$(srcdir)/check_utils.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_utils.Tpo" "$(DEPDIR)/check_test-check_utils.Po"; else rm -f "$(DEPDIR)/check_test-check_utils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_utils.c' object='check_test-check_utils.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_utils.Po' tmpdepfile='$(DEPDIR)/check_test-check_utils.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_utils.obj `if test -f 'check_utils.c'; then $(CYGPATH_W) 'check_utils.c'; else $(CYGPATH_W) '$(srcdir)/check_utils.c'; fi`
+
+check_test-check_utils.lo: check_utils.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check_utils.lo -MD -MP -MF "$(DEPDIR)/check_test-check_utils.Tpo" -c -o check_test-check_utils.lo `test -f 'check_utils.c' || echo '$(srcdir)/'`check_utils.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check_utils.Tpo" "$(DEPDIR)/check_test-check_utils.Plo"; else rm -f "$(DEPDIR)/check_test-check_utils.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check_utils.c' object='check_test-check_utils.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check_utils.Plo' tmpdepfile='$(DEPDIR)/check_test-check_utils.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check_utils.lo `test -f 'check_utils.c' || echo '$(srcdir)/'`check_utils.c
+
+check_test-check-hildon-range-editor.o: check-hildon-range-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-range-editor.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" -c -o check_test-check-hildon-range-editor.o `test -f 'check-hildon-range-editor.c' || echo '$(srcdir)/'`check-hildon-range-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-range-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-range-editor.c' object='check_test-check-hildon-range-editor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-range-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-range-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-range-editor.o `test -f 'check-hildon-range-editor.c' || echo '$(srcdir)/'`check-hildon-range-editor.c
+
+check_test-check-hildon-range-editor.obj: check-hildon-range-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-range-editor.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" -c -o check_test-check-hildon-range-editor.obj `if test -f 'check-hildon-range-editor.c'; then $(CYGPATH_W) 'check-hildon-range-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-range-editor.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-range-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-range-editor.c' object='check_test-check-hildon-range-editor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-range-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-range-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-range-editor.obj `if test -f 'check-hildon-range-editor.c'; then $(CYGPATH_W) 'check-hildon-range-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-range-editor.c'; fi`
+
+check_test-check-hildon-range-editor.lo: check-hildon-range-editor.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-range-editor.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" -c -o check_test-check-hildon-range-editor.lo `test -f 'check-hildon-range-editor.c' || echo '$(srcdir)/'`check-hildon-range-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-range-editor.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-range-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-range-editor.c' object='check_test-check-hildon-range-editor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-range-editor.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-range-editor.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-range-editor.lo `test -f 'check-hildon-range-editor.c' || echo '$(srcdir)/'`check-hildon-range-editor.c
+
+check_test-check-hildon-date-editor.o: check-hildon-date-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-date-editor.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" -c -o check_test-check-hildon-date-editor.o `test -f 'check-hildon-date-editor.c' || echo '$(srcdir)/'`check-hildon-date-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-date-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-date-editor.c' object='check_test-check-hildon-date-editor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-date-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-date-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-date-editor.o `test -f 'check-hildon-date-editor.c' || echo '$(srcdir)/'`check-hildon-date-editor.c
+
+check_test-check-hildon-date-editor.obj: check-hildon-date-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-date-editor.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" -c -o check_test-check-hildon-date-editor.obj `if test -f 'check-hildon-date-editor.c'; then $(CYGPATH_W) 'check-hildon-date-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-date-editor.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-date-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-date-editor.c' object='check_test-check-hildon-date-editor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-date-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-date-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-date-editor.obj `if test -f 'check-hildon-date-editor.c'; then $(CYGPATH_W) 'check-hildon-date-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-date-editor.c'; fi`
+
+check_test-check-hildon-date-editor.lo: check-hildon-date-editor.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-date-editor.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" -c -o check_test-check-hildon-date-editor.lo `test -f 'check-hildon-date-editor.c' || echo '$(srcdir)/'`check-hildon-date-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-date-editor.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-date-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-date-editor.c' object='check_test-check-hildon-date-editor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-date-editor.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-date-editor.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-date-editor.lo `test -f 'check-hildon-date-editor.c' || echo '$(srcdir)/'`check-hildon-date-editor.c
+
+check_test-check-hildon-time-editor.o: check-hildon-time-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-editor.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" -c -o check_test-check-hildon-time-editor.o `test -f 'check-hildon-time-editor.c' || echo '$(srcdir)/'`check-hildon-time-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-time-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-editor.c' object='check_test-check-hildon-time-editor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-editor.o `test -f 'check-hildon-time-editor.c' || echo '$(srcdir)/'`check-hildon-time-editor.c
+
+check_test-check-hildon-time-editor.obj: check-hildon-time-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-editor.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" -c -o check_test-check-hildon-time-editor.obj `if test -f 'check-hildon-time-editor.c'; then $(CYGPATH_W) 'check-hildon-time-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-time-editor.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-time-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-editor.c' object='check_test-check-hildon-time-editor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-editor.obj `if test -f 'check-hildon-time-editor.c'; then $(CYGPATH_W) 'check-hildon-time-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-time-editor.c'; fi`
+
+check_test-check-hildon-time-editor.lo: check-hildon-time-editor.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-editor.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" -c -o check_test-check-hildon-time-editor.lo `test -f 'check-hildon-time-editor.c' || echo '$(srcdir)/'`check-hildon-time-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-time-editor.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-editor.c' object='check_test-check-hildon-time-editor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-editor.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-editor.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-editor.lo `test -f 'check-hildon-time-editor.c' || echo '$(srcdir)/'`check-hildon-time-editor.c
+
+check_test-check-hildon-weekday-picker.o: check-hildon-weekday-picker.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-weekday-picker.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" -c -o check_test-check-hildon-weekday-picker.o `test -f 'check-hildon-weekday-picker.c' || echo '$(srcdir)/'`check-hildon-weekday-picker.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-weekday-picker.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-weekday-picker.c' object='check_test-check-hildon-weekday-picker.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-weekday-picker.o `test -f 'check-hildon-weekday-picker.c' || echo '$(srcdir)/'`check-hildon-weekday-picker.c
+
+check_test-check-hildon-weekday-picker.obj: check-hildon-weekday-picker.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-weekday-picker.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" -c -o check_test-check-hildon-weekday-picker.obj `if test -f 'check-hildon-weekday-picker.c'; then $(CYGPATH_W) 'check-hildon-weekday-picker.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-weekday-picker.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-weekday-picker.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-weekday-picker.c' object='check_test-check-hildon-weekday-picker.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-weekday-picker.obj `if test -f 'check-hildon-weekday-picker.c'; then $(CYGPATH_W) 'check-hildon-weekday-picker.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-weekday-picker.c'; fi`
+
+check_test-check-hildon-weekday-picker.lo: check-hildon-weekday-picker.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-weekday-picker.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" -c -o check_test-check-hildon-weekday-picker.lo `test -f 'check-hildon-weekday-picker.c' || echo '$(srcdir)/'`check-hildon-weekday-picker.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-weekday-picker.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-weekday-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-weekday-picker.c' object='check_test-check-hildon-weekday-picker.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-weekday-picker.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-weekday-picker.lo `test -f 'check-hildon-weekday-picker.c' || echo '$(srcdir)/'`check-hildon-weekday-picker.c
+
+check_test-check-hildon-controlbar.o: check-hildon-controlbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-controlbar.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" -c -o check_test-check-hildon-controlbar.o `test -f 'check-hildon-controlbar.c' || echo '$(srcdir)/'`check-hildon-controlbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" "$(DEPDIR)/check_test-check-hildon-controlbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-controlbar.c' object='check_test-check-hildon-controlbar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-controlbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-controlbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-controlbar.o `test -f 'check-hildon-controlbar.c' || echo '$(srcdir)/'`check-hildon-controlbar.c
+
+check_test-check-hildon-controlbar.obj: check-hildon-controlbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-controlbar.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" -c -o check_test-check-hildon-controlbar.obj `if test -f 'check-hildon-controlbar.c'; then $(CYGPATH_W) 'check-hildon-controlbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-controlbar.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" "$(DEPDIR)/check_test-check-hildon-controlbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-controlbar.c' object='check_test-check-hildon-controlbar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-controlbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-controlbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-controlbar.obj `if test -f 'check-hildon-controlbar.c'; then $(CYGPATH_W) 'check-hildon-controlbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-controlbar.c'; fi`
+
+check_test-check-hildon-controlbar.lo: check-hildon-controlbar.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-controlbar.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" -c -o check_test-check-hildon-controlbar.lo `test -f 'check-hildon-controlbar.c' || echo '$(srcdir)/'`check-hildon-controlbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo" "$(DEPDIR)/check_test-check-hildon-controlbar.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-controlbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-controlbar.c' object='check_test-check-hildon-controlbar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-controlbar.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-controlbar.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-controlbar.lo `test -f 'check-hildon-controlbar.c' || echo '$(srcdir)/'`check-hildon-controlbar.c
+
+check_test-check-hildon-seekbar.o: check-hildon-seekbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-seekbar.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" -c -o check_test-check-hildon-seekbar.o `test -f 'check-hildon-seekbar.c' || echo '$(srcdir)/'`check-hildon-seekbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" "$(DEPDIR)/check_test-check-hildon-seekbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-seekbar.c' object='check_test-check-hildon-seekbar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-seekbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-seekbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-seekbar.o `test -f 'check-hildon-seekbar.c' || echo '$(srcdir)/'`check-hildon-seekbar.c
+
+check_test-check-hildon-seekbar.obj: check-hildon-seekbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-seekbar.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" -c -o check_test-check-hildon-seekbar.obj `if test -f 'check-hildon-seekbar.c'; then $(CYGPATH_W) 'check-hildon-seekbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-seekbar.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" "$(DEPDIR)/check_test-check-hildon-seekbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-seekbar.c' object='check_test-check-hildon-seekbar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-seekbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-seekbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-seekbar.obj `if test -f 'check-hildon-seekbar.c'; then $(CYGPATH_W) 'check-hildon-seekbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-seekbar.c'; fi`
+
+check_test-check-hildon-seekbar.lo: check-hildon-seekbar.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-seekbar.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" -c -o check_test-check-hildon-seekbar.lo `test -f 'check-hildon-seekbar.c' || echo '$(srcdir)/'`check-hildon-seekbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo" "$(DEPDIR)/check_test-check-hildon-seekbar.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-seekbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-seekbar.c' object='check_test-check-hildon-seekbar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-seekbar.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-seekbar.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-seekbar.lo `test -f 'check-hildon-seekbar.c' || echo '$(srcdir)/'`check-hildon-seekbar.c
+
+check_test-check-hildon-time-picker.o: check-hildon-time-picker.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-picker.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" -c -o check_test-check-hildon-time-picker.o `test -f 'check-hildon-time-picker.c' || echo '$(srcdir)/'`check-hildon-time-picker.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-time-picker.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-picker.c' object='check_test-check-hildon-time-picker.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-picker.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-picker.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-picker.o `test -f 'check-hildon-time-picker.c' || echo '$(srcdir)/'`check-hildon-time-picker.c
+
+check_test-check-hildon-time-picker.obj: check-hildon-time-picker.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-picker.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" -c -o check_test-check-hildon-time-picker.obj `if test -f 'check-hildon-time-picker.c'; then $(CYGPATH_W) 'check-hildon-time-picker.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-time-picker.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-time-picker.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-picker.c' object='check_test-check-hildon-time-picker.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-picker.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-picker.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-picker.obj `if test -f 'check-hildon-time-picker.c'; then $(CYGPATH_W) 'check-hildon-time-picker.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-time-picker.c'; fi`
+
+check_test-check-hildon-time-picker.lo: check-hildon-time-picker.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-time-picker.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" -c -o check_test-check-hildon-time-picker.lo `test -f 'check-hildon-time-picker.c' || echo '$(srcdir)/'`check-hildon-time-picker.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo" "$(DEPDIR)/check_test-check-hildon-time-picker.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-time-picker.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-time-picker.c' object='check_test-check-hildon-time-picker.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-time-picker.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-time-picker.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-time-picker.lo `test -f 'check-hildon-time-picker.c' || echo '$(srcdir)/'`check-hildon-time-picker.c
+
+check_test-check-hildon-number-editor.o: check-hildon-number-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-number-editor.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" -c -o check_test-check-hildon-number-editor.o `test -f 'check-hildon-number-editor.c' || echo '$(srcdir)/'`check-hildon-number-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-number-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-number-editor.c' object='check_test-check-hildon-number-editor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-number-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-number-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-number-editor.o `test -f 'check-hildon-number-editor.c' || echo '$(srcdir)/'`check-hildon-number-editor.c
+
+check_test-check-hildon-number-editor.obj: check-hildon-number-editor.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-number-editor.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" -c -o check_test-check-hildon-number-editor.obj `if test -f 'check-hildon-number-editor.c'; then $(CYGPATH_W) 'check-hildon-number-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-number-editor.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-number-editor.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-number-editor.c' object='check_test-check-hildon-number-editor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-number-editor.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-number-editor.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-number-editor.obj `if test -f 'check-hildon-number-editor.c'; then $(CYGPATH_W) 'check-hildon-number-editor.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-number-editor.c'; fi`
+
+check_test-check-hildon-number-editor.lo: check-hildon-number-editor.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-number-editor.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" -c -o check_test-check-hildon-number-editor.lo `test -f 'check-hildon-number-editor.c' || echo '$(srcdir)/'`check-hildon-number-editor.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo" "$(DEPDIR)/check_test-check-hildon-number-editor.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-number-editor.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-number-editor.c' object='check_test-check-hildon-number-editor.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-number-editor.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-number-editor.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-number-editor.lo `test -f 'check-hildon-number-editor.c' || echo '$(srcdir)/'`check-hildon-number-editor.c
+
+check_test-check-hildon-calendar-popup.o: check-hildon-calendar-popup.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-calendar-popup.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" -c -o check_test-check-hildon-calendar-popup.o `test -f 'check-hildon-calendar-popup.c' || echo '$(srcdir)/'`check-hildon-calendar-popup.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" "$(DEPDIR)/check_test-check-hildon-calendar-popup.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-calendar-popup.c' object='check_test-check-hildon-calendar-popup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-calendar-popup.o `test -f 'check-hildon-calendar-popup.c' || echo '$(srcdir)/'`check-hildon-calendar-popup.c
+
+check_test-check-hildon-calendar-popup.obj: check-hildon-calendar-popup.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-calendar-popup.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" -c -o check_test-check-hildon-calendar-popup.obj `if test -f 'check-hildon-calendar-popup.c'; then $(CYGPATH_W) 'check-hildon-calendar-popup.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-calendar-popup.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" "$(DEPDIR)/check_test-check-hildon-calendar-popup.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-calendar-popup.c' object='check_test-check-hildon-calendar-popup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-calendar-popup.obj `if test -f 'check-hildon-calendar-popup.c'; then $(CYGPATH_W) 'check-hildon-calendar-popup.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-calendar-popup.c'; fi`
+
+check_test-check-hildon-calendar-popup.lo: check-hildon-calendar-popup.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-calendar-popup.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" -c -o check_test-check-hildon-calendar-popup.lo `test -f 'check-hildon-calendar-popup.c' || echo '$(srcdir)/'`check-hildon-calendar-popup.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo" "$(DEPDIR)/check_test-check-hildon-calendar-popup.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-calendar-popup.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-calendar-popup.c' object='check_test-check-hildon-calendar-popup.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-calendar-popup.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-calendar-popup.lo `test -f 'check-hildon-calendar-popup.c' || echo '$(srcdir)/'`check-hildon-calendar-popup.c
+
+check_test-check-hildon-caption.o: check-hildon-caption.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-caption.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-caption.Tpo" -c -o check_test-check-hildon-caption.o `test -f 'check-hildon-caption.c' || echo '$(srcdir)/'`check-hildon-caption.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo" "$(DEPDIR)/check_test-check-hildon-caption.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-caption.c' object='check_test-check-hildon-caption.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-caption.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-caption.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-caption.o `test -f 'check-hildon-caption.c' || echo '$(srcdir)/'`check-hildon-caption.c
+
+check_test-check-hildon-caption.obj: check-hildon-caption.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-caption.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-caption.Tpo" -c -o check_test-check-hildon-caption.obj `if test -f 'check-hildon-caption.c'; then $(CYGPATH_W) 'check-hildon-caption.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-caption.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo" "$(DEPDIR)/check_test-check-hildon-caption.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-caption.c' object='check_test-check-hildon-caption.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-caption.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-caption.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-caption.obj `if test -f 'check-hildon-caption.c'; then $(CYGPATH_W) 'check-hildon-caption.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-caption.c'; fi`
+
+check_test-check-hildon-caption.lo: check-hildon-caption.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-caption.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-caption.Tpo" -c -o check_test-check-hildon-caption.lo `test -f 'check-hildon-caption.c' || echo '$(srcdir)/'`check-hildon-caption.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo" "$(DEPDIR)/check_test-check-hildon-caption.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-caption.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-caption.c' object='check_test-check-hildon-caption.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-caption.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-caption.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-caption.lo `test -f 'check-hildon-caption.c' || echo '$(srcdir)/'`check-hildon-caption.c
+
+check_test-check-hildon-defines.o: check-hildon-defines.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-defines.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-defines.Tpo" -c -o check_test-check-hildon-defines.o `test -f 'check-hildon-defines.c' || echo '$(srcdir)/'`check-hildon-defines.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo" "$(DEPDIR)/check_test-check-hildon-defines.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-defines.c' object='check_test-check-hildon-defines.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-defines.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-defines.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-defines.o `test -f 'check-hildon-defines.c' || echo '$(srcdir)/'`check-hildon-defines.c
+
+check_test-check-hildon-defines.obj: check-hildon-defines.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-defines.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-defines.Tpo" -c -o check_test-check-hildon-defines.obj `if test -f 'check-hildon-defines.c'; then $(CYGPATH_W) 'check-hildon-defines.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-defines.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo" "$(DEPDIR)/check_test-check-hildon-defines.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-defines.c' object='check_test-check-hildon-defines.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-defines.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-defines.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-defines.obj `if test -f 'check-hildon-defines.c'; then $(CYGPATH_W) 'check-hildon-defines.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-defines.c'; fi`
+
+check_test-check-hildon-defines.lo: check-hildon-defines.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-defines.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-defines.Tpo" -c -o check_test-check-hildon-defines.lo `test -f 'check-hildon-defines.c' || echo '$(srcdir)/'`check-hildon-defines.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo" "$(DEPDIR)/check_test-check-hildon-defines.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-defines.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-defines.c' object='check_test-check-hildon-defines.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-defines.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-defines.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-defines.lo `test -f 'check-hildon-defines.c' || echo '$(srcdir)/'`check-hildon-defines.c
+
+check_test-check-hildon-code-dialog.o: check-hildon-code-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-code-dialog.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" -c -o check_test-check-hildon-code-dialog.o `test -f 'check-hildon-code-dialog.c' || echo '$(srcdir)/'`check-hildon-code-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-code-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-code-dialog.c' object='check_test-check-hildon-code-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-code-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-code-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-code-dialog.o `test -f 'check-hildon-code-dialog.c' || echo '$(srcdir)/'`check-hildon-code-dialog.c
+
+check_test-check-hildon-code-dialog.obj: check-hildon-code-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-code-dialog.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" -c -o check_test-check-hildon-code-dialog.obj `if test -f 'check-hildon-code-dialog.c'; then $(CYGPATH_W) 'check-hildon-code-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-code-dialog.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-code-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-code-dialog.c' object='check_test-check-hildon-code-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-code-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-code-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-code-dialog.obj `if test -f 'check-hildon-code-dialog.c'; then $(CYGPATH_W) 'check-hildon-code-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-code-dialog.c'; fi`
+
+check_test-check-hildon-code-dialog.lo: check-hildon-code-dialog.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-code-dialog.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" -c -o check_test-check-hildon-code-dialog.lo `test -f 'check-hildon-code-dialog.c' || echo '$(srcdir)/'`check-hildon-code-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-code-dialog.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-code-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-code-dialog.c' object='check_test-check-hildon-code-dialog.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-code-dialog.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-code-dialog.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-code-dialog.lo `test -f 'check-hildon-code-dialog.c' || echo '$(srcdir)/'`check-hildon-code-dialog.c
+
+check_test-check-hildon-find-toolbar.o: check-hildon-find-toolbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-find-toolbar.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" -c -o check_test-check-hildon-find-toolbar.o `test -f 'check-hildon-find-toolbar.c' || echo '$(srcdir)/'`check-hildon-find-toolbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" "$(DEPDIR)/check_test-check-hildon-find-toolbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-find-toolbar.c' object='check_test-check-hildon-find-toolbar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-find-toolbar.o `test -f 'check-hildon-find-toolbar.c' || echo '$(srcdir)/'`check-hildon-find-toolbar.c
+
+check_test-check-hildon-find-toolbar.obj: check-hildon-find-toolbar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-find-toolbar.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" -c -o check_test-check-hildon-find-toolbar.obj `if test -f 'check-hildon-find-toolbar.c'; then $(CYGPATH_W) 'check-hildon-find-toolbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-find-toolbar.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" "$(DEPDIR)/check_test-check-hildon-find-toolbar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-find-toolbar.c' object='check_test-check-hildon-find-toolbar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-find-toolbar.obj `if test -f 'check-hildon-find-toolbar.c'; then $(CYGPATH_W) 'check-hildon-find-toolbar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-find-toolbar.c'; fi`
+
+check_test-check-hildon-find-toolbar.lo: check-hildon-find-toolbar.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-find-toolbar.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" -c -o check_test-check-hildon-find-toolbar.lo `test -f 'check-hildon-find-toolbar.c' || echo '$(srcdir)/'`check-hildon-find-toolbar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo" "$(DEPDIR)/check_test-check-hildon-find-toolbar.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-find-toolbar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-find-toolbar.c' object='check_test-check-hildon-find-toolbar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-find-toolbar.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-find-toolbar.lo `test -f 'check-hildon-find-toolbar.c' || echo '$(srcdir)/'`check-hildon-find-toolbar.c
+
+check_test-check-hildon-sort-dialog.o: check-hildon-sort-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-sort-dialog.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" -c -o check_test-check-hildon-sort-dialog.o `test -f 'check-hildon-sort-dialog.c' || echo '$(srcdir)/'`check-hildon-sort-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-sort-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-sort-dialog.c' object='check_test-check-hildon-sort-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-sort-dialog.o `test -f 'check-hildon-sort-dialog.c' || echo '$(srcdir)/'`check-hildon-sort-dialog.c
+
+check_test-check-hildon-sort-dialog.obj: check-hildon-sort-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-sort-dialog.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" -c -o check_test-check-hildon-sort-dialog.obj `if test -f 'check-hildon-sort-dialog.c'; then $(CYGPATH_W) 'check-hildon-sort-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-sort-dialog.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-sort-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-sort-dialog.c' object='check_test-check-hildon-sort-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-sort-dialog.obj `if test -f 'check-hildon-sort-dialog.c'; then $(CYGPATH_W) 'check-hildon-sort-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-sort-dialog.c'; fi`
+
+check_test-check-hildon-sort-dialog.lo: check-hildon-sort-dialog.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-sort-dialog.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" -c -o check_test-check-hildon-sort-dialog.lo `test -f 'check-hildon-sort-dialog.c' || echo '$(srcdir)/'`check-hildon-sort-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-sort-dialog.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-sort-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-sort-dialog.c' object='check_test-check-hildon-sort-dialog.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-sort-dialog.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-sort-dialog.lo `test -f 'check-hildon-sort-dialog.c' || echo '$(srcdir)/'`check-hildon-sort-dialog.c
+
+check_test-check-hildon-note.o: check-hildon-note.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-note.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-note.Tpo" -c -o check_test-check-hildon-note.o `test -f 'check-hildon-note.c' || echo '$(srcdir)/'`check-hildon-note.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-note.Tpo" "$(DEPDIR)/check_test-check-hildon-note.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-note.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-note.c' object='check_test-check-hildon-note.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-note.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-note.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-note.o `test -f 'check-hildon-note.c' || echo '$(srcdir)/'`check-hildon-note.c
+
+check_test-check-hildon-note.obj: check-hildon-note.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-note.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-note.Tpo" -c -o check_test-check-hildon-note.obj `if test -f 'check-hildon-note.c'; then $(CYGPATH_W) 'check-hildon-note.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-note.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-note.Tpo" "$(DEPDIR)/check_test-check-hildon-note.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-note.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-note.c' object='check_test-check-hildon-note.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-note.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-note.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-note.obj `if test -f 'check-hildon-note.c'; then $(CYGPATH_W) 'check-hildon-note.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-note.c'; fi`
+
+check_test-check-hildon-note.lo: check-hildon-note.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-note.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-note.Tpo" -c -o check_test-check-hildon-note.lo `test -f 'check-hildon-note.c' || echo '$(srcdir)/'`check-hildon-note.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-note.Tpo" "$(DEPDIR)/check_test-check-hildon-note.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-note.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-note.c' object='check_test-check-hildon-note.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-note.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-note.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-note.lo `test -f 'check-hildon-note.c' || echo '$(srcdir)/'`check-hildon-note.c
+
+check_test-check-hildon-volumebar.o: check-hildon-volumebar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" -c -o check_test-check-hildon-volumebar.o `test -f 'check-hildon-volumebar.c' || echo '$(srcdir)/'`check-hildon-volumebar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar.c' object='check_test-check-hildon-volumebar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar.o `test -f 'check-hildon-volumebar.c' || echo '$(srcdir)/'`check-hildon-volumebar.c
+
+check_test-check-hildon-volumebar.obj: check-hildon-volumebar.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" -c -o check_test-check-hildon-volumebar.obj `if test -f 'check-hildon-volumebar.c'; then $(CYGPATH_W) 'check-hildon-volumebar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-volumebar.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar.c' object='check_test-check-hildon-volumebar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar.obj `if test -f 'check-hildon-volumebar.c'; then $(CYGPATH_W) 'check-hildon-volumebar.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-volumebar.c'; fi`
+
+check_test-check-hildon-volumebar.lo: check-hildon-volumebar.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" -c -o check_test-check-hildon-volumebar.lo `test -f 'check-hildon-volumebar.c' || echo '$(srcdir)/'`check-hildon-volumebar.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar.c' object='check_test-check-hildon-volumebar.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar.lo `test -f 'check-hildon-volumebar.c' || echo '$(srcdir)/'`check-hildon-volumebar.c
+
+check_test-check-hildon-volumebar-range.o: check-hildon-volumebar-range.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar-range.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" -c -o check_test-check-hildon-volumebar-range.o `test -f 'check-hildon-volumebar-range.c' || echo '$(srcdir)/'`check-hildon-volumebar-range.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar-range.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar-range.c' object='check_test-check-hildon-volumebar-range.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar-range.o `test -f 'check-hildon-volumebar-range.c' || echo '$(srcdir)/'`check-hildon-volumebar-range.c
+
+check_test-check-hildon-volumebar-range.obj: check-hildon-volumebar-range.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar-range.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" -c -o check_test-check-hildon-volumebar-range.obj `if test -f 'check-hildon-volumebar-range.c'; then $(CYGPATH_W) 'check-hildon-volumebar-range.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-volumebar-range.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar-range.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar-range.c' object='check_test-check-hildon-volumebar-range.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar-range.obj `if test -f 'check-hildon-volumebar-range.c'; then $(CYGPATH_W) 'check-hildon-volumebar-range.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-volumebar-range.c'; fi`
+
+check_test-check-hildon-volumebar-range.lo: check-hildon-volumebar-range.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-volumebar-range.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" -c -o check_test-check-hildon-volumebar-range.lo `test -f 'check-hildon-volumebar-range.c' || echo '$(srcdir)/'`check-hildon-volumebar-range.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo" "$(DEPDIR)/check_test-check-hildon-volumebar-range.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-volumebar-range.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-volumebar-range.c' object='check_test-check-hildon-volumebar-range.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-volumebar-range.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-volumebar-range.lo `test -f 'check-hildon-volumebar-range.c' || echo '$(srcdir)/'`check-hildon-volumebar-range.c
+
+check_test-check-hildon-banner.o: check-hildon-banner.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-banner.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-banner.Tpo" -c -o check_test-check-hildon-banner.o `test -f 'check-hildon-banner.c' || echo '$(srcdir)/'`check-hildon-banner.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo" "$(DEPDIR)/check_test-check-hildon-banner.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-banner.c' object='check_test-check-hildon-banner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-banner.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-banner.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-banner.o `test -f 'check-hildon-banner.c' || echo '$(srcdir)/'`check-hildon-banner.c
+
+check_test-check-hildon-banner.obj: check-hildon-banner.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-banner.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-banner.Tpo" -c -o check_test-check-hildon-banner.obj `if test -f 'check-hildon-banner.c'; then $(CYGPATH_W) 'check-hildon-banner.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-banner.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo" "$(DEPDIR)/check_test-check-hildon-banner.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-banner.c' object='check_test-check-hildon-banner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-banner.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-banner.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-banner.obj `if test -f 'check-hildon-banner.c'; then $(CYGPATH_W) 'check-hildon-banner.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-banner.c'; fi`
+
+check_test-check-hildon-banner.lo: check-hildon-banner.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-banner.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-banner.Tpo" -c -o check_test-check-hildon-banner.lo `test -f 'check-hildon-banner.c' || echo '$(srcdir)/'`check-hildon-banner.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo" "$(DEPDIR)/check_test-check-hildon-banner.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-banner.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-banner.c' object='check_test-check-hildon-banner.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-banner.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-banner.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-banner.lo `test -f 'check-hildon-banner.c' || echo '$(srcdir)/'`check-hildon-banner.c
+
+check_test-check-hildon-wizard-dialog.o: check-hildon-wizard-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-wizard-dialog.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" -c -o check_test-check-hildon-wizard-dialog.o `test -f 'check-hildon-wizard-dialog.c' || echo '$(srcdir)/'`check-hildon-wizard-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-wizard-dialog.c' object='check_test-check-hildon-wizard-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-wizard-dialog.o `test -f 'check-hildon-wizard-dialog.c' || echo '$(srcdir)/'`check-hildon-wizard-dialog.c
+
+check_test-check-hildon-wizard-dialog.obj: check-hildon-wizard-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-wizard-dialog.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" -c -o check_test-check-hildon-wizard-dialog.obj `if test -f 'check-hildon-wizard-dialog.c'; then $(CYGPATH_W) 'check-hildon-wizard-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-wizard-dialog.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-wizard-dialog.c' object='check_test-check-hildon-wizard-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-wizard-dialog.obj `if test -f 'check-hildon-wizard-dialog.c'; then $(CYGPATH_W) 'check-hildon-wizard-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-wizard-dialog.c'; fi`
+
+check_test-check-hildon-wizard-dialog.lo: check-hildon-wizard-dialog.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-wizard-dialog.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" -c -o check_test-check-hildon-wizard-dialog.lo `test -f 'check-hildon-wizard-dialog.c' || echo '$(srcdir)/'`check-hildon-wizard-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-wizard-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-wizard-dialog.c' object='check_test-check-hildon-wizard-dialog.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-wizard-dialog.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-wizard-dialog.lo `test -f 'check-hildon-wizard-dialog.c' || echo '$(srcdir)/'`check-hildon-wizard-dialog.c
+
+check_test-check-hildon-font-selection-dialog.o: check-hildon-font-selection-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-font-selection-dialog.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" -c -o check_test-check-hildon-font-selection-dialog.o `test -f 'check-hildon-font-selection-dialog.c' || echo '$(srcdir)/'`check-hildon-font-selection-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-font-selection-dialog.c' object='check_test-check-hildon-font-selection-dialog.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-font-selection-dialog.o `test -f 'check-hildon-font-selection-dialog.c' || echo '$(srcdir)/'`check-hildon-font-selection-dialog.c
+
+check_test-check-hildon-font-selection-dialog.obj: check-hildon-font-selection-dialog.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-font-selection-dialog.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" -c -o check_test-check-hildon-font-selection-dialog.obj `if test -f 'check-hildon-font-selection-dialog.c'; then $(CYGPATH_W) 'check-hildon-font-selection-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-font-selection-dialog.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-font-selection-dialog.c' object='check_test-check-hildon-font-selection-dialog.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-font-selection-dialog.obj `if test -f 'check-hildon-font-selection-dialog.c'; then $(CYGPATH_W) 'check-hildon-font-selection-dialog.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-font-selection-dialog.c'; fi`
+
+check_test-check-hildon-font-selection-dialog.lo: check-hildon-font-selection-dialog.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-font-selection-dialog.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" -c -o check_test-check-hildon-font-selection-dialog.lo `test -f 'check-hildon-font-selection-dialog.c' || echo '$(srcdir)/'`check-hildon-font-selection-dialog.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo" "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-font-selection-dialog.c' object='check_test-check-hildon-font-selection-dialog.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-font-selection-dialog.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-font-selection-dialog.lo `test -f 'check-hildon-font-selection-dialog.c' || echo '$(srcdir)/'`check-hildon-font-selection-dialog.c
+
+check_test-check-hildon-window.o: check-hildon-window.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-window.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-window.Tpo" -c -o check_test-check-hildon-window.o `test -f 'check-hildon-window.c' || echo '$(srcdir)/'`check-hildon-window.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-window.Tpo" "$(DEPDIR)/check_test-check-hildon-window.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-window.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-window.c' object='check_test-check-hildon-window.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-window.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-window.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-window.o `test -f 'check-hildon-window.c' || echo '$(srcdir)/'`check-hildon-window.c
+
+check_test-check-hildon-window.obj: check-hildon-window.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-window.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-window.Tpo" -c -o check_test-check-hildon-window.obj `if test -f 'check-hildon-window.c'; then $(CYGPATH_W) 'check-hildon-window.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-window.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-window.Tpo" "$(DEPDIR)/check_test-check-hildon-window.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-window.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-window.c' object='check_test-check-hildon-window.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-window.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-window.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-window.obj `if test -f 'check-hildon-window.c'; then $(CYGPATH_W) 'check-hildon-window.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-window.c'; fi`
+
+check_test-check-hildon-window.lo: check-hildon-window.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-window.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-window.Tpo" -c -o check_test-check-hildon-window.lo `test -f 'check-hildon-window.c' || echo '$(srcdir)/'`check-hildon-window.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-window.Tpo" "$(DEPDIR)/check_test-check-hildon-window.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-window.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-window.c' object='check_test-check-hildon-window.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-window.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-window.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-window.lo `test -f 'check-hildon-window.c' || echo '$(srcdir)/'`check-hildon-window.c
+
+check_test-check-hildon-program.o: check-hildon-program.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-program.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-program.Tpo" -c -o check_test-check-hildon-program.o `test -f 'check-hildon-program.c' || echo '$(srcdir)/'`check-hildon-program.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-program.Tpo" "$(DEPDIR)/check_test-check-hildon-program.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-program.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-program.c' object='check_test-check-hildon-program.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-program.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-program.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-program.o `test -f 'check-hildon-program.c' || echo '$(srcdir)/'`check-hildon-program.c
+
+check_test-check-hildon-program.obj: check-hildon-program.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-program.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-program.Tpo" -c -o check_test-check-hildon-program.obj `if test -f 'check-hildon-program.c'; then $(CYGPATH_W) 'check-hildon-program.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-program.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-program.Tpo" "$(DEPDIR)/check_test-check-hildon-program.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-program.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-program.c' object='check_test-check-hildon-program.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-program.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-program.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-program.obj `if test -f 'check-hildon-program.c'; then $(CYGPATH_W) 'check-hildon-program.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-program.c'; fi`
+
+check_test-check-hildon-program.lo: check-hildon-program.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-program.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-program.Tpo" -c -o check_test-check-hildon-program.lo `test -f 'check-hildon-program.c' || echo '$(srcdir)/'`check-hildon-program.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-program.Tpo" "$(DEPDIR)/check_test-check-hildon-program.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-program.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-program.c' object='check_test-check-hildon-program.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-program.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-program.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-program.lo `test -f 'check-hildon-program.c' || echo '$(srcdir)/'`check-hildon-program.c
+
+check_test-check-hildon-composite-widget.o: check-hildon-composite-widget.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-composite-widget.o -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" -c -o check_test-check-hildon-composite-widget.o `test -f 'check-hildon-composite-widget.c' || echo '$(srcdir)/'`check-hildon-composite-widget.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" "$(DEPDIR)/check_test-check-hildon-composite-widget.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-composite-widget.c' object='check_test-check-hildon-composite-widget.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-composite-widget.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-composite-widget.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-composite-widget.o `test -f 'check-hildon-composite-widget.c' || echo '$(srcdir)/'`check-hildon-composite-widget.c
+
+check_test-check-hildon-composite-widget.obj: check-hildon-composite-widget.c
+@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-composite-widget.obj -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" -c -o check_test-check-hildon-composite-widget.obj `if test -f 'check-hildon-composite-widget.c'; then $(CYGPATH_W) 'check-hildon-composite-widget.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-composite-widget.c'; fi`; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" "$(DEPDIR)/check_test-check-hildon-composite-widget.Po"; else rm -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-composite-widget.c' object='check_test-check-hildon-composite-widget.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-composite-widget.Po' tmpdepfile='$(DEPDIR)/check_test-check-hildon-composite-widget.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-composite-widget.obj `if test -f 'check-hildon-composite-widget.c'; then $(CYGPATH_W) 'check-hildon-composite-widget.c'; else $(CYGPATH_W) '$(srcdir)/check-hildon-composite-widget.c'; fi`
+
+check_test-check-hildon-composite-widget.lo: check-hildon-composite-widget.c
+@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -MT check_test-check-hildon-composite-widget.lo -MD -MP -MF "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" -c -o check_test-check-hildon-composite-widget.lo `test -f 'check-hildon-composite-widget.c' || echo '$(srcdir)/'`check-hildon-composite-widget.c; \
+@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo" "$(DEPDIR)/check_test-check-hildon-composite-widget.Plo"; else rm -f "$(DEPDIR)/check_test-check-hildon-composite-widget.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='check-hildon-composite-widget.c' object='check_test-check-hildon-composite-widget.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/check_test-check-hildon-composite-widget.Plo' tmpdepfile='$(DEPDIR)/check_test-check-hildon-composite-widget.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(check_test_CFLAGS) $(CFLAGS) -c -o check_test-check-hildon-composite-widget.lo `test -f 'check-hildon-composite-widget.c' || echo '$(srcdir)/'`check-hildon-composite-widget.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkdir_p) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/TEST-CASES.txt b/tests/TEST-CASES.txt
new file mode 100644
index 0000000..a16e437
--- /dev/null
+++ b/tests/TEST-CASES.txt
@@ -0,0 +1,4367 @@
+1. PURPOSE
+***************************************************************************
+
+This file contains a brief documentation of each test case considered.
+Please, whenever you add new test case, add its documentation here to
+the list of tests (Section 2). Use the following example as a template:
+
+----------------------------------------------------------------------------------------
+- hildon-range-editor: Used to define an integer range.
+
+ - hildon_range_editor_set_range: Sets the current range value of the control.
+
+ - Errors detected: none.
+
+ 1. Test that a regular range inside the range limits configured are set properly.
+ a) Using a range limit of (0, 50), tested with range value (10, 30)
+
+ 2. Test that limit range values inside the range limits configured are set properly.
+ b) Using a range limit of (0, 50), tested with range value (0, 50)
+ c) Using a range limit of (100, 200), tested with range value (100, 200)
+
+ 3. Test that values outside the configured range limits are handled properly.
+ a) Using a range limit of (0, 50), tested with range value (-5, 55)
+ b) Using a range limit of (0, 50), tested with range value (-5, 5)
+ c) Using a range limit of (0, 50), tested with range value (5, 55)
+
+ - hildon_range_editor_get_range: Gets the current range value of the control.
+
+ Used along with hildon_range_editor_set_range tests in the same test cases.
+
+ - ...
+----------------------------------------------------------------------------------------
+
+
+2. LIST OF TESTS
+***************************************************************************
+
+- hildon-number-editor: A widget used to enter a number within a pre-defined range
+
+ - Property "value": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_number_editor_set_range: Sets accepted number range for editor
+
+ - Errors detected: none.
+
+ 1. Test that setting regular ranges do not cause a problem
+ a) Setting a number limit of (0, 100)
+ b) Setting a number limit of (1, 100)
+ c) Setting a number limit of (-100, 100)
+ d) Setting a number limit of (-100, 0)
+ e) Setting a number limit of (-100, -1)
+
+ 2. Test that limit range values do not cause any problem
+ a) Setting a number limit of G_MAXINT and G_MININT
+ b) Set a number limit of (0, 100), and test that 0 and 100 work properly
+
+ 3. Test that invalid values do not cause problems
+ a) Change the order of the minimum and maximum and check if it does not change (200, -2)
+ b) Set values where high value is less than low value (0, 100)
+ c) Set a range to a NULL widget
+
+ - hildon_number_editor_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_number_editor_set_value: [TODO]
+ - hildon_number_editor_get_value: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-date-editor: Used to input a date.
+
+ - Property "year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "month": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "day": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "min-year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max-year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_date_editor_set_date: Sets the current date.
+
+ - Errors detected: none.
+
+ 1. Test that setting a regular date is done properly.
+ a) Set date 30/03/1981
+
+ 2. Test setting limit values for dates
+ a) Set date 30/03/2037
+ b) Set date 30/03/1970
+ c) Set date 30/01/1981
+ d) Set date 30/12/1981
+ e) Set date 31/3/1981
+ f) Set date 30/06/1981
+ g) Set date 28/02/1981
+ h) Set date 29/02/1980
+
+ 3. Test that invalid values do not cause problems
+ a) The HildonDateEditor is NULL
+ b) The first argument is a GtkHbox instead of a HildonDateEditor
+ c) Set an invalid date (29/02/1981) for a regular year
+ d) Set negative values for year/month/day
+ e) Set invalid day for a month (31 of November)
+ f) Set invalid year (< 1970) 30/03/1969
+ g) Set invalid year (> 2037) 30/03/2038
+ h) Set invalid month (0) 30/00/1981
+ i) Set invalid month (13) 30/13/1981
+ j) Set invalid day (0) 00/03/1981
+ k) Set invalid day (32) 32/03/1981
+
+ - hildon_date_editor_get_date: gets the current date.
+
+ - Errors detected: none.
+
+ 1. Test getting a regular date
+ a) Set date 30/03/1981. Check that the values retrieved
+ with get_date are the same as the ones got with
+ get_property
+
+ 2. Test getting dates when the parameters are invalid
+ a) The HildonDateEditor is NULL
+ b) The year is NULL
+ c) The month is NULL
+ d) The day is NULL
+
+ - hildon_date_editor_get_year: gets the current year.
+
+ - Errors detected: none.
+
+ 1. Test getting a regular value for the year
+ a) Get a year set with set_date
+ b) Get a year set with set_year
+ c) Get a year set with set_property
+
+ 2. Test getting a limit value for the year
+ a) Get the year 2037
+ b) Get the year 1970
+
+ 3. Test getting a year with invalid parameters
+ a) Get a year when HildonDateEditor is NULL
+ b) Get a year with GtkHBox instead of a HildonDateEditor
+ c) Get the year 2038
+ d) Get the year 1969
+
+ - hildon_date_editor_set_year: sets the current year.
+
+ - Errors detected: none.
+
+ 1. Test setting a regular value for the year
+ a) Set year 1981
+
+ 2. Test setting limit values for the year
+ a) Set year 2037
+ b) Set year 1970
+
+ - hildon_date_editor_get_month: gets the current month.
+
+ - Errors detected: none.
+
+ 1. Test getting a regular value for the month
+ a) Get a month set with set_date
+ b) Get a month set with set_month
+ c) Get a month set with set_property
+
+ 2. Test getting limit values for month
+ a) Get month 12
+ b) Get month 1
+
+ 3. Test getting a month with invalid parameters
+ a) Get a month when HildonDateEditor is NULL
+ b) Get a month with GtkHBox instead of a HildonDateEditor
+
+ - hildon_date_editor_set_month: sets the current month.
+
+ - Errors detected: none
+
+ 1. Test setting a regular value for the month
+ a) Set month 3
+
+ 2. Test setting limit values for the month
+ a) Set month 12
+ b) Set month 1
+
+ - hildon_date_editor_get_day: gets the current day.
+
+ - Errors detected: none
+
+ 1. Test getting a regular value for the day
+ a) Get a day set with set_date
+ b) Get a day set with set_day
+ c) Get a day set with set_property
+
+ 2. Test getting limit values for day
+ a) Get day 31/03
+ b) Get day 30/06
+ c) Get day 29/02/1980 (leap year)
+ d) Get day 28/02/1981 (common year)
+ e) Get day 1/02
+
+ 3. Test getting a day with invalid parameters
+ a) Get a day when HildonDateEditor is NULL
+ b) Get a day with GtkHBox instead of a HildonDateEditor
+
+ - hildon_date_editor_set_day: sets the current day.
+
+ - Errors detected: none
+
+ 1. Test setting a regular value for the day
+ a) Set day 30
+
+ 2. Test setting values for the day over the limits
+ a) Set day 31/03
+ b) Set day 30/06
+ c) Set day 29/02/1980 (leap year)
+ d) Set day 28/02/1981 (common year)
+ e) Set day 1/02
+
+------------------------------------------------------------------------------
+
+- hildon-range-editor: A widget to define an integer range of values within a limit
+
+ - Property "min": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "lower": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "higher": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "separator": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_range_editor_set_limits: Sets range limits
+ - hildon_range_editor_get_min: Retrieves current minimum limit for the range minimum value
+ - hildon_range_editor_get_max: Retrieves current maximum limit for the range maximum value
+
+ - Errors detected: none.
+
+ 1. Test that setting regular ranges do not cause a problem
+ a) Set limits to (-10,10)
+ b) Set limits to (0,10)
+ c) Set limits to (-10,0)
+ d) Set limits to (1,10)
+ e) Set limits to (-10,-10)
+
+ 2. Test that limit range values do not cause any problem
+ a) Set limits to (G_MININT,G_MAXINT)
+
+ 3. Test that invalid values do not cause problems
+ a) Set inverted limits to (10,-10)
+ b) Set range editor object to NULL for set_limits
+ c) Set range editor object to NULL for get_min get_max
+
+ - hildon_range_editor_set_min: Sets the minimum range limit.
+
+ - Errors detected: none.
+
+ 1. Test that setting regular ranges do not cause a problem
+ a) Set minimum limit to -100
+ a) Set minimum limit to 0
+ a) Set minimum limit to 100
+
+ 2. Test that limit range values do not cause any problem
+ a) Set minimum limit to G_MININT
+
+ 3. Test that invalid values do not cause problems
+ a) Set minimum limit grater than maximum limit.
+ b) Set range editor object to NULL.
+
+ - hildon_range_editor_set_max: Sets the maximum range limit.
+
+ - Errors detected: none.
+
+ 1. Test that setting regular ranges do not cause a problem
+ a) Set maximum limit to -100
+ a) Set maximum limit to 0
+ a) Set maximum limit to 100
+
+ 2. Test that limit range values do not cause any problem
+ a) Set maximum limit to G_MAXINT
+
+ 3. Test that invalid values do not cause problems
+ a) Set maximum limit lower than minimum limit.
+ b) Set range editor object to NULL.
+
+ - hildon_range_editor_new_with_separator: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_range_editor_set_range: [TODO]
+ - hildon_range_editor_get_range: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_range_editor_set_lower: [TODO]
+ - hildon_range_editor_get_lower: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_range_editor_set_higher: [TODO]
+ - hildon_range_editor_get_higher: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_range_editor_set_separator: [TODO]
+ - hildon_range_editor_get_separator: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-time-editor: A widget used to enter hours, minutes and seconds in two different modes:
+ "time mode" (23h 59m 59s) and "duration mode" (99:59:59).
+
+ - Property "ticks": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "show_seconds": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "show_hours": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "duration_mode": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "duration_min": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "duration_max": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_time_editor_set_time: Sets the time using hours, minutes and seconds format.
+ - hildon_time_editor_get_time: Gets the time using hours, minutes and seconds format.
+
+ - Errors detected: twelve.
+
+ NOTE: Following errors are errors only when tests are executed with gtk_widget_show
+ and gtk_main_iteration is called while are events pending. If you execute tests
+ without showing them, tests are properly passed.
+
+ 1.c) If time is set to 5h 30m 45s and show_seconds=TRUE, seconds are re-validated because of "focus out"
+ event and are set to current system time seconds. Ramdomly can happen several cases:
+ * Current system seconds are equal to 45, event is called, current system seconds
+ are set and test pass.
+ * Current system seconds are diferent from 45, event is called, current system seconds
+ are set and test fail.
+ * Event is not called seconds are set to passed value and test pass.
+ Tipical behaviour is the described on second case.
+
+ 1.d) Similar to 1.c).
+ 1.e) If time is set to 5:30:45, duration_mode is TRUE and show_seconds is TRUE, seconds are set to 0. The problem seems
+ to be similar to 1.c) and 1.d) but with diferent way of setting seconds. The problem appears
+ when hildon_time_editor_set_ticks set values to hours, minutes and seconds entries, because
+ "focus out" event is called and this event calls "hildon_time_editor_validate", which
+ call to "hildon_time_editor_real_validate". This last method if several cases can
+ set time to validated values again (0 seconds in this case).
+ 1.f) Similar to 1.e).
+ 2.c) Similar to 1.c).
+ 2.d) Similar to 1.c).
+ 2.e) Similar to 1.e).
+ 2.f) Similar to 1.e).
+ 3.d) Similar to 1.c).
+ 3.e) Similar to 1.c).
+ 3.g) Similar to 1.e).
+ 3.h) Similar to 1.e).
+
+ 1. Test that setting regular ranges do not cause problems
+ a) Set the time to "5h 30m" in time mode.
+ b) Set the time to "18h 2m" in time mode.
+ c) Set the time to "5h 30m 45s" in time mode.
+ d) Set the time to "18h 2m 5s" in time mode.
+ e) Set the time to "5:30:45" in duration mode.
+ f) Set the time to "50:40:30" in duration mode.
+
+ 2. Test that limit range values do not cause problems
+ a) Set time value to 0h 0m 0s in time mode.
+ b) Set time value to 23h 59m 0s in time mode.
+ c) Set time value to 23h 59m 59s in time mode.
+ d) Set time value to 0h 59m 59s in time mode.
+ e) Set time value to 99:59:59 in duration mode.
+ f) Set time value to 0:0:0 in duration mode.
+
+ 3. Test that invalid values do not cause problems
+ a) Set NULL editor time object on set_time.
+ b) Set NULL editor time object on get_time.
+ c) Set time value to 00h 60m 00s in time mode.
+ d) Set time value to 0h 0m 60s in time mode.
+ e) Set time value to 24h 60m 60s in time mode.
+ f) Set time value to 50h 100m 100s in time mode.
+ g) Set time value to 0:80:80 in duration mode.
+ h) Set time value to 110:80:80 in duration mode.
+
+ - hildon_time_editor_set_ticks: Sets the time using seconds since midnight.
+ - hildon_time_editor_get_ticks: Gets the time using seconds since midnight.
+
+ - Errors detected: one segmentation fault 3.a) and seven errors depeding on "showing" widgets.
+ 3.a) => Raises segmentation fault.
+
+ NOTE: Following errors are errors only when tests are executed with gtk_widget_show
+ and gtk_main_iteration is called while are events pending. If you execute tests
+ without showing them, tests are properly passed.
+ 2.b) If ticks are set to 86399 and show_seconds=TRUE, seconds are re-validated because of "focus out"
+ event. Then seconds can be set to current system time seconds. Ramdomly can happen several cases:
+ * Current system seconds are equal to 59, event is called, current system seconds
+ are set and test pass.
+ * Current system seconds are diferent from 59, event is called, current system seconds
+ are set and test fail.
+ * Event is not called seconds are set to passed value and test pass.
+ Tipical behaviour is the described on second case.
+ 2.d) If time is set to 359999, duration_mode is TRUE and show_seconds is TRUE, seconds are set to 0.
+ The problem seems to be similar to 2.b but with diferent way of setting seconds. The problem appears
+ when hildon_time_editor_set_ticks set values to hours, minutes and seconds entries, because
+ "focus out" event is called and this event calls "hildon_time_editor_validate", which
+ call to "hildon_time_editor_real_validate". This last method if several cases can
+ set time to validated values again (0 seconds in this case).
+ 3.b) Similar to 2.b).
+ 3.c) Similar to 2.b).
+ 3.d) Similar to 2.b).
+ 3.e) Similar to 2.d).
+ 3.f) Similar to 2.d).
+
+ 1. Test that setting regular ranges do not cause problems
+ a) Set ticks to 45660 seconds (time mode).
+ b) Set ticks to 124860 seconds (duration mode).
+
+ 2. Test that limit range values do not cause problems
+ a) Set ticks to 0 seconds (time mode).
+ b) Set ticks to 86399 seconds (time mode).
+ c) Set ticks to 0 seconds (duration mode).
+ d) Set ticks to 359999 seconds (duration mode).
+
+ 3. Test that invalid values do not cause problems
+ a) Set ticks on a NULL object.
+ b) Set ticks to 86400 seconds (time mode).
+ c) Set ticks to 360000 seconds (time mode).
+ d) Set ticks to 90060 seconds (time mode).
+ e) Set ticks to 360000 seconds (duration mode).
+ f) Set ticks to 654333 seconds (duration mode).
+
+ - hildon_time_editor_set_duration_min: Sets the minimum allowed duration time.
+ - hildon_time_editor_get_duration_min: Gets the minimum allowed duration time.
+ - hildon_time_editor_set_duration_max: Sets the maximum allowed duration time.
+ - hildon_time_editor_get_duration_max: Sets the maximum allowed duration time.
+
+ - Errors detected: none.
+ NOTE: 3.f) test was modified in order not to test is ticks are properly set. This is related with
+ problem of hildon_time_editor_set_ticks, that set seconds to 0 if duration_mode is TRUE and show_seconds is TRUE.
+ If "hildon_time_editor_set_ticks" problem is solved in future, this test could be added.
+
+ 1. Test that setting regular ranges do not cause problems
+ a) Set minimum duration to 100000 seconds having ticks under 100000.
+ b) Set minimum duration to 100000 seconds having ticks over 100000.
+ c) Set maximum duration to 200000 seconds having ticks under 100000.
+ d) Set maximum duration to 200000 seconds having ticks over 100000.
+
+ 2. Test that limit range values do not cause problems
+ a) Set minimum duration to MAX_DURATION seconds having ticks under MAX_DURATION.
+ b) Set maximum duration to MAX_DURATION seconds having ticks under MAX_DURATION.
+ c) Set maximum duration to MIN_DURATION seconds having ticks over MIN_DURATION.
+ d) Set minimum duration to MIN_DURATION seconds having ticks over MIN_DURATION.
+
+ 3. Test that invalid values do not cause problems
+ a) Set minimum duration on a NULL object
+ b) Set and get minimum duration to MAX_DURATION+1 setting ticks previously to a value under MAX_DURATION.
+ c) Set and get minimum duration to MAX_DURATION+1 setting ticks previously to a value over MAX_DURATION.
+ d) Set maximum duration on NULL object
+ e) Set and get maximum duration to MAX_DURATION+1 setting ticks previously to a value under MAX_DURATION.
+ f) Set and get maximum duration to MAX_DURATION+1 setting ticks previously to a value over MAX_DURATION.
+
+ - hildon_time_editor_set_duration_range: Sets the duration range of the #HildonTimeEditor widget.
+ - hildon_time_editor_get_duration_range: Sets the duration range of the #HildonTimeEditor widget.
+
+ - Errors detected: none.
+
+ 1. Test that setting regular ranges do not cause problems
+ a) Set duration range (100000,200000) having ticks under 100000.
+ b) Set duration range (100000,200000) having ticks equal to 100000.
+ c) Set duration range (100000,200000) having ticks over 100000.
+ d) Set duration range (100000,100000) having ticks under 100000.
+ e) Set duration range (100000,100000) having ticks equal 100000.
+ f) Set duration range (100000,100000) having ticks over 100000.
+
+ 2. Test that limit range values do not cause problems
+ a) Set duration range to (MIN_DURATION,MAX_DURATION) having ticks between MIN_DURATION and MAX_DURATION.
+ b) Set duration range to (MIN_DURATION,MIN_DURATION) having ticks over MIN_DURATION.
+ c) Set duration range to (MAX_DURATION,MAX_DURATION) having ticks under MAX_DURATION.
+
+ 3. Test that invalid values do not cause problems
+ a) Set duration_range on a NULL object.
+ b) Set duration range to (MAX_DURATION,MIN_DURATION).
+ c) Set duration range to (MIN_DURATION,MAX_DURATION+1) having ticks between MIN_DURATION and MAX_DURATION.
+ d) Set duration range to (MAX_DURATION+1,MIN_DURATION).
+ e) Set duration range to (MAX_DURATION+1,MAX_DURATION+3).
+ f) Set duration range to (MAX_DURATION+3,MAX_DURATION+1).
+
+ - hildon_time_editor_set_show_seconds: [TODO]
+ - hildon_time_editor_get_show_seconds: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_time_editor_set_show_hours: [TODO]
+ - hildon_time_editor_get_show_hours: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_time_editor_set_duration_mode: [TODO]
+ - hildon_time_editor_get_duration_mode: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-calendar-popup: Calendar widget
+
+ - Property "min-year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max-year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "day": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "month": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "year": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_calendar_popup_set_date:
+ - hildon_calendar_popup_get_date:
+
+ - Errors detected: none.
+
+ 1. Test that regular dates work properly.
+ a) Set and get date 30/03/1981.
+
+ 2. Test that limit values for year, month and day work properly.
+ a) Set and get year to max-year property
+ b) Set and get year to min-year property
+ c) Set and get month to 12
+ d) Set and get month to 1
+ e) Set and get day to 31 (March)
+ f) Set and get day to 30 (April)
+ g) Set and get day to 29 (February 2004)
+ h) Set and get day to 28 (February 2006)
+ i) Set and get day to 1
+ j) Set and get maximum allowed date (according to max-year property).
+ k) Set and get minimum allowed date (according to min-year property).
+
+ 3. Test that invalid date values are handled properly.
+ a) Set and get year above max-year property
+ b) Set and get year under min-year property
+ c) Set and get month to 13
+ d) Set and get month to 0
+ e) Set and get day to 32 (March)
+ f) Set and get day to 31 (April)
+ g) Set and get day to 30 (February 2004)
+ h) Set and get day to 29 (February 2006)
+ i) Set and get day to 0
+ j) Set and get above maximum allowed date (according to max-year property).
+ k) Set and get under minimum allowed date (according to min-year property).
+ l) Set and get date using NULL calendar object
+
+ - hildon_calendar_popup_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-weekday-picker: Widget that allows to select one or several days from week days.
+
+ - hildon_weekday_picker_set_day: Sets a day.
+ - hildon_weekday_picker_isset_day: Checks if a day is set.
+
+ - Errors detected: none.
+
+ 1. Test that regular days work properly.
+ a) Set and isset the day "WEDNESDAY".
+ b) Set and isset two days (WEDNESDAY and SATURDAY) on weekday picker and check that only the two selected days are set.
+
+ 2. Test that limit values for days work properly.
+ a) Set and isset the day "MONDAY".
+ b) Set and isset the day "SUNDAY".
+ c) Set and isset the days "MONDAY" and "SUNDAY".
+ d) Set all days.
+
+ 3. Test that invalid day values work properly.
+ a) Set MONDAY on NULL weekday picker.
+ b) Set G_DATE_BAD_WEEKDAY.
+ c) Set 8 on weekday picker.
+ d) Set -2 on weekday picker.
+ e) Do isset from NULL weekday picker
+
+ - hildon_weekday_picker_unset_day: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_weekday_picker_toggle_day: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_weekday_picker_set_all: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_weekday_picker_unset_all: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-controlbar: A widget used to show a bar that can be useful to control progress on tasks.
+
+ - Property "min": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "value": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_controlbar_set_range: Sets the bar range.
+
+ - Errors detected: 3.b), 3.c), 3.d), 3.e)
+ 3.b) => Minimum must be a value greater than 0 but
+ set_range method does not check this
+ precondition.
+ 3.c) => Sets minimum to G_MININT and maximum to
+ -1 instead of 0.
+ 3.d) => Sets both minimum and maximum to -1.
+ 3.e) => Sets maximum to -1 and minimum to G_MININT.
+
+ 1. Test that regular ranges do not cause problems.
+ a) Set a range to [20,1000].
+ b) Set a range to [20,20].
+
+ 2. Test that limit range values do not cause problems.
+ a) Set a range to [0,G_MAXINT-1].
+
+ 3. Test that invalid values on range do not cause problems.
+ a) Set a range of [10,100] on NULL object.
+ b) Set a range of [-1,G_MAXINT].
+ c) Set a range of [G_MININT,-1].
+ d) Set a range of [G_MAXINT,-1].
+ e) Set a range of [1,G_MININT].
+
+ - hildon_controlbar_set_value: Sets current progress.
+ - hildon_controlbar_get_value: Gets current progress.
+
+ - Errors detected: 3.g)
+ 3.g) => Method documentation says that value
+ must be less than G_MAXINT, but G_MAXINT can
+ be set when the widget is not showed. When the
+ widget is showed a SIGKILL signal is received
+ because it enters into an endless loop.
+
+ 1. Test that regular values do not cause problems.
+ a) Set a value of 500 in the range [0,1000].
+
+ 2. Test that limit values do not cause problems.
+ a) Set a value of 0 in the range [0,1000].
+ b) Set a value of 1000 in the range [0,1000].
+
+ 3. Test that invalid values do not cause problems.
+ a) Set a value of 1 in a NULL controlbar.
+ b) Set a value of -1 in the range [2,1000].
+ c) Set a value of 1 in the range [2,1000].
+ d) Set a value of G_MININT in the range [2,1000].
+ e) Set a value of 1001 in the range [2,1000].
+ f) Set a value of G_MAXINT in the range [2,1000].
+ g) Set a value of G_MAXINT in the range [2,G_MAXINT].
+
+ - hildon_controlbar_set_max: [TODO]
+ - hildon_controlbar_get_max: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_controlbar_set_min: [TODO]
+ - hildon_controlbar_get_min: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-color-selector: A widget that is used to select one base or custom defined GdkColor.
+
+ - Property "color": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_color_selector_set_color: Sets a GdkColor on a hildon color selector.
+ - hildon_color_selector_get_color: Gets the color on a hildon color selector.
+
+ - Errors detected: none.
+
+ 1. Test that regular color values do not cause problems.
+ a) Set the color #33CC33.
+
+ 2. Test that limit color values do not cause problems.
+ a) Set and get base color defined by #000000.
+ b) Set and get base color defined by #FFFFFF.
+ c) Set and get base color defined by #FF0000.
+ d) Set and get base color defined by #0000FF.
+
+ 3. Test that invalid color values do not cause problems.
+ a) Set and get base color defined by #00FFFF and pixel 0.
+ b) Set and get base color defined by #0ABCDE and pixel 0.
+ c) Set and get base color defined by #FF00FF and pixel 0.
+ d) Set the color (65536,65536,65536).
+ d) Set and get base color defined by NULL color.
+ e) Set base color on NULL object.
+ f) Get base color from NULL object.
+
+ - hildon_color_selector_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-color-button: A widget that is used to open a HildonColorSelector.
+
+ - Property "color": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_color_button_set_color: Sets a GdkColor on a hildon color button.
+ - hildon_color_button_get_color: Gets color set on a hildon color button.
+
+ - Errors detected: none.
+
+ 1. Test that regular color values do not cause problems.
+ a) Set color defined by red=255, green=255, blue=255 and pixel = 255.
+ b) Set color defined by red=10 green=20, blue=30 and pixel = 10.
+ c) Set color defined by red=20 green=10, blue=30 and pixel = 10.
+ d) Set color defined by red=30 green=10, blue=20 and pixel = 20.
+
+ 2. Test that limit color values do not cause problems.
+ a) Set color defined by red=0, green=0, blue=0 and pixel = 0.
+ b) Set color defined by red=G_MAXUINT16 green=G_MAXUINT16, blue=G_MAXUINT16 and pixel = G_MAXUINT32.
+ c) Set color defined by red=G_MAXUINT16 green=0, blue=0 and pixel = G_MAXUINT32.
+ d) Set color defined by red=0 green=G_MAXUINT16, blue=0 and pixel = 0.
+ e) Set color defined by red=0 green=0, blue=G_MAXUINT16 and pixel = G_MAXUINT32.
+
+ 3. Test that invalid values do not cause problems.
+ a) Set color defined by (0, 0, 0) on a NULL object.
+ b) Get color from a NULL object.
+ c) Set color defined by (0, 0, 0) on a GtkHBox object.
+ d) Get color on a GtkHBox object.
+
+ - hildon_color_button_new_with_color: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-seekbar: A widget that allows seeking in media with a range widget.
+
+ - Property "total_time": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "position": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "fraction": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_seekbar_set_total_time: Sets total time on a seekbar.
+ - hildon_seekbar_get_total_time: Gets total time.
+
+ - Errors detected: none.
+
+ 1. Test that regular time values do not cause problems.
+ a) Set and get 1000 seconds without setting new position and fraction.
+ b) Set and get 500 seconds without setting new position but new fraction should be set.
+ c) Set and get 500 seconds without setting new position but new fraction should be set.
+
+ 2. Test that limit time values do not cause problems.
+ a) Set and get 0 seconds setting new position and fraction (previously set to 750).
+ b) Set and get G_MAXINT seconds without setting new position and fraction.
+
+ 3. Test that invalid time values do not cause problems.
+ a) Set and get seconds to a NULL object.
+ b) Set and get 0 seconds without setting new position and fraction.
+ c) Set and get -1 seconds without setting new position and fraction.
+
+ - hildon_seekbar_set_fraction: Sets current fraction (maximum position in a stream/the amount currently downloaded) on a seekbar.
+ - hildon_seekbar_get_fraction: Gets current fraction.
+
+ - Errors detected: none.
+
+ 1. Test that setting regular fraction values do not cause problems.
+ a) Set and get fraction to 500 with total time set to 1000.
+ b) Set and get fraction to 490 with total time set to 1000, fraction and position previously set to 500.
+
+ 2. Test that limit fraction do not cause problems.
+ a) Set and get fraction to 0 with total time set to G_MAXINT.
+ b) Set and get fraction to 1 with total time set to G_MAXINT.
+ c) Set and get fraction to G_MAXINT-1 with total time set to G_MAXINT.
+ d) Set and get fraction to G_MAXINT with total time set to G_MAXINT.
+
+ 3. Test that invalid fraction do not cause problems.
+ a) Set and get fraction to NULL object.
+ b) Set and get fraction to -1 with total time set to G_MAXINT.
+ c) Set and get fraction to 2000 with total time set to 1000.
+
+ - hildon_seekbar_set_position: [TODO]
+ - hildon_seekbar_get_position: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+------------------------------------------------------------------------------
+
+- hildon-dialoghelp: A helper to allow enabling help if required.
+
+ - gtk_dialog_help_enable: Enable help on dialog.
+ - gtk_dialog_help_disable: Disable help on dialog.
+
+ - Errors detected: none.
+
+ 1. Test that enable and disable do not cause problems.
+ a) Test if gtk_dialog_help_enable actually enables help dialog status
+ b) Test if gtk_dialog_help_enable actually adds help atom to atoms' list
+ c) Test if gtk_dialog_help_disable actually removes help atom from atoms' list
+
+ 2. Test that enable and disable with invalid objects do not cause problems.
+ a) Enable help dialog on a NULL object.
+ b) Disable help dialog on a NULL object.
+
+------------------------------------------------------------------------------
+
+- hildon-caption: This widget is intended to be a container to another
+ widgets that could show a label for the captionized widget.
+
+ - Property "label": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "icon": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "status": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "size_group": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "separator": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "expand": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_caption_is_mandatory: checks if the status of the
+ widget is mandatory or optional
+
+ - Errors detected: none.
+
+ 1. Test that the mandatory status of the widget is retrieved
+ correctly.
+ a) Create a HildonCaption with HILDON_CAPTION_OPTIONAL
+ flag and call is_mandatory
+ b) Create a HildonCaption with HILDON_CAPTION_MANDATORY
+ flag and call is_mandatory
+
+ 2. Test that invalid values do not cause problems.
+ a) The HildonCaption is NULL
+ b) The first argument is a GtkHbox instead of a HildonCaption
+
+ - hildon_caption_set_status: checks if the status of the
+ widget is set correctly
+
+ - Errors detected: none.
+
+ 1. Test that setting a valid HildonCaptionStatus works
+ correctly.
+ a) Set the status HILDON_CAPTION_MANDATORY
+
+ 2. Test that invalid values do not cause problems.
+ a) Set the status 8
+ b) The HildonCaption is NULL
+ c) The first argument is a GtkHbox instead of a
+ HildonCaption
+
+ - hildon_caption_get_status: checks if the status of the
+ widget is got correctly
+
+ - Errors detected: none.
+
+ 1. Test that getting a previously set valid
+ HildonCaptionStatus works correctly
+ a) Get the default status HILDON_CAPTION_OPTIONAL
+ b) Get the status HILDON_CAPTION_MANDATORY set with
+ set_status
+ c) Get the status HILDON_CAPTION_OPTIONAL set with
+ set_property
+
+ 2. Test that invalid values do not cause problems
+ a) The HildonCaption is NULL
+ b) The first argument is a GtkHbox instead of a
+ HildonCaption
+
+ - hildon_caption_set_label: checks if the label of the
+ widget is set correctly
+
+ - Errors detected: none.
+
+ 1. Test if setting a valid label works correctly
+ a) Set with a regular label
+ b) Set an empty label
+
+ 2. Test that invalid values do not cause problems
+ a) The HildonCaption is NULL
+ b) Set a NULL label
+ c) The first argument is a GtkHbox instead of a
+ HildonCaption
+
+ - hildon_caption_get_label: checks if the label of the
+ widget is got correctly
+
+ - Errors detected: none.
+
+ 1. Test that getting a previously set valid label works
+ correctly
+ a) Get a sample label set with set_label
+ b) Get an empty label set with set_label
+
+ 2. Test that invalid values do not cause problems
+ a) The HildonCaption is NULL
+ b) Get a NULL label set with set_property
+ c) The first argument is a GtkHbox instead of a
+ HildonCaption
+
+ - hildon_caption_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_caption_set_icon_image: [TODO]
+ - hildon_caption_get_icon_image: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_caption_set_separator: [TODO]
+ - hildon_caption_get_separator: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_caption_set_label_alignment: [TODO]
+ - hildon_caption_get_label_alignment: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_caption_set_child_expand: [TODO]
+ - hildon_caption_get_child_expand: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+------------------------------------------------------------------------------
+
+- hildon-defines: This file is not a widget, is a library with two
+ utility functions and a lot of defines, as its name says. These two
+ functions should be tested with functional tests because the unit
+ tests that we can implement do not check its more important
+ behavior, a signal emission.
+
+ - hildon_gtk_widget_set_logical_font: changes the logical font of a
+ given widget and all its children
+
+ - Errors detected: none.
+
+ 1. Test setting a new logical font works as expected
+ a) set the font "TimesNewRoman"
+
+ 2. Test that invalid parameters do not cause problems
+ a) set the font "TimesNewRoman" to a NULL widget
+ b) set a NULL font to a GtkLabel
+
+ - hildon_gtk_widget_set_logical_color: changes the logical color of a
+ given widget and all its children
+
+ - Errors detected: none.
+
+ 1. Test setting a new logical color works as expected
+ a) set the color "Blue"
+
+ 2. Test that invalid parameters do not cause problems
+ a) set the color "Blue" to a NULL widget
+ b) set a NULL color to a GtkLabel
+ HildonCaption
+
+------------------------------------------------------------------------------
+
+- hildon-time-picker: A widget that allows a user to set the time.
+
+ - Property "minutes": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_time_picker_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_time_picker_set_total_time: Sets the time on a time picker object.
+ - hildon_time_picker_get_total_time: Gets the time from a time picker object.
+
+ - Errors detected: none.
+
+ 1. Test that regular time values do not cause problems.
+ a) Set time to 5h 30m using time picker object.
+ b) Set time to 18h 2m using time picker object.
+
+ 2. Test that limit time values do not cause problems.
+ a) Set time to 0h 0m using time picker object.
+ b) Set time to 0h 59m using time picker object.
+ c) Set time to 12h 59m using time picker object.
+ d) Set time to 23h 59m using time picker object.
+
+ 3. Test that invalid time values do not cause problems.
+ a) Set time using a NULL time picker.
+ b) Set time to 0h 60m using time picker object.
+ c) Set time to 24h 0m using time picker object.
+ d) Set time to 24h 60m using time picker object.
+ e) Set time to 16000h 15533m using time picker object.
+
+
+------------------------------------------------------------------------------
+
+- hildon-name-password-dialog: A widget that allows to enter an username and a password.
+
+ - Property "content": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "name": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "password": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_name_password_dialog_new_with_default: Creates a dialog with default name and password
+
+ - Errors detected: none.
+
+ 1. Test that dialog is created properly with regular username values.
+ a) Create new name and password dialog with "test_name" and "test_password" by default.
+ b) Create new name and password dialog with "0123456789" and "123412341234" by default.
+ c) Create new name and password dialog with a string
+ combining letters, number and symbols for both
+ attributes.
+ d) Create new name and password dialog with empty strings
+
+ 2. Test that dialog is created properly with invalid username values.
+ a) Create a name and password dialog with NULL name.
+ b) Create a name and password dialog with NULL password.
+
+ - hildon_name_password_dialog_get_name: Get name property from name-password-dialog.
+
+ - Errors detected: none.
+
+ 1. Test that getting name is correct with regular values.
+ a) Get name "test_name" set by g_object_set_property.
+ b) Get name "0123456789" set by g_object_set_property.
+ c) Get name combining letters, number and symbols set by g_object_set_property.
+
+ 2. Test that getting name is correct with invalid values.
+ a) Get name on a NULL object.
+ c) Get empty password set by g_object_set_property with NULL value.
+
+ - hildon_name_password_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_name_password_dialog_get_password: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_name_password_dialog_set_domain: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+
+------------------------------------------------------------------------------
+
+- hildon-get-password-dialog: A widget that allows to get a password.
+
+ - Property "domain": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "password": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "numbers_only": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "caption-label": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max-characters": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "get-old": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_get_password_dialog_new_with_default: Creates a dialog password
+ by default.
+
+ - Errors detected: none.
+
+ 1. Test that dialog is created properly with regular password values.
+ a) Create new get password dialog with "test_password" password by default.
+ b) Create new get password dialog with "" password by default.
+ c) Create new get password dialog with "1234567890" password by default.
+ d) Create new get password dialog with a password combining letters, numbers and symbols by default.
+
+ 2. Test that dialog is created properly with invalid password values.
+ a) Create new get password dialog with NULL password by default.
+ b) Create new get password dialog with "" password and NULL window by default.
+
+
+ - hildon_get_password_dialog_set_max_characters: Get password property from get-password-dialog.
+
+ - Errors detected: none.
+
+ 1. Test that getting password is correct with regular values.
+ a) Set max characters to 10
+ b) Set max characters to G_MAXUINT16+1
+
+ 2. Test that getting name is correct with limit values.
+ a) Set max characters to 1.
+ b) Set max characters to G_MAXINT.
+
+ 3. Test that getting name is correct with invalid values.
+ a) Set max characters to 0.
+ b) Set max characters to -1.
+ c) Set max characters on a NULL object.
+
+ - hildon_get_password_dialog_get_password: Get password property from get-password-dialog.
+
+ - Errors detected: none.
+
+ 1. Test that getting password is correct with regular values.
+ a) Get password "test_password" set by g_object_set_property.
+ b) Get password "01234567890" set by g_object_set_property.
+ c) Get password combining letters, numbers and symbols set by g_object_set_property.
+ d) Get password "" set by set by g_object_set_property.
+
+ 2. Test that getting password is correct with invalid values.
+ a) Get empty password set by g_object_set_property with NULL value.
+ b) Get password from a NULL object.
+
+ - hildon_get_password_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_get_password_dialog_set_domain: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_get_password_dialog_set_caption: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-find-toolbar: Used to define a search toolbar.
+
+ - Property "label":
+
+ - Errors detected: none.
+
+ 1. Test set and get regular values for "label" property
+ a) Tested with a regular label
+ b) Tested with an empty label
+
+ 2. Test invalid values for "label" property
+ a) Tested with a NULL label
+
+ - Property "prefix": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "list": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "column": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "max_characters": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "history_limit": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_find_toolbar_new_with_model: Creates a toolbar with a given list of history terms.
+
+ - Errors detected: none.
+
+ 1. Test that model is set properly
+ a) Check that model set is the same as retrieved using g_object_get_property
+
+ - hildon_find_toolbar_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_find_toolbar_highlight_entry: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-sort-dialog: Used to define a sort dialog.
+
+ - Property "sort-key": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "sort-order": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_sort_dialog_add_sort_key: Adds a new sort key to the list.
+ - hildon_sort_dialog_set_sort_key: Sets the index of the currently selected sort key.
+ - hildon_sort_dialog_get_sort_key: Gets the index of the currently selected sort key.
+
+ - Errors detected: none.
+
+ 1. Check addition, set and get of valid regular values.
+ a) Add 3 keys to the list, then set and get key 1
+ b) Unselect sort key
+
+ 2. Check set and get of limit values.
+ a) Get of current key after dialog construction (empty list of keys)
+ b) Add 3 keys to the list, then set and get keys 0 and 2
+
+ 3. Check handling of invalid values.
+ a) Set of key with empty key list
+ b) Set negative key, lower than -1
+ c) Set of key outside the range of a non empty key list
+ d) Set a duplicated key and check if it is filtered
+ e) Add a NULL sort key.
+ f) Add key with a NULL object
+ g) Set key with a NULL object
+ h) Get key with a NULL object
+
+ - hildon_sort_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_sort_dialog_get_sort_order: [TODO]
+ - hildon_sort_dialog_set_sort_order: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-volumebar: Used to define a volumebar
+
+ - Property "can-focus": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "has_mute": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "level": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "mute": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_volumebar_set_mute: Enables or disables mute
+ - hildon_volumebar_get_mute: Gets current mute state
+
+ - Errors detected: None, but seems to be a non tested error
+ in 1.b: focus is set to self (HildonVolumebar) by set_mute,
+ but the init method of HildonVolumebar unsets the CAN_FOCUS
+ flag for this widget, so focus is not set at all. Seems
+ that instead of setting focus to self, it should be set to
+ priv->volumebar, which is the focusable object. Could not
+ create a test for this because we cannot access priv elements
+ from the unit tests.
+
+ 1. Check normal usage
+ a) Set mute ON when volumebar is focusable
+ b) Set mute OFF when volumebar is focusable
+ c) Set mute ON when volumebar is not focusable
+ d) Set mute OFF when volumebar is not focusable
+
+ 2. Check handling of invalid values
+ a) Set mute with NULL volumebar object
+ b) Get mute with NULL volumebar object
+
+ - hildon_volumebar_get_level: [TODO]
+ - hildon_volumebar_set_level: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_volumebar_level_change: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_volumebar_get_adjustment: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-volumebar-range: Used to define the volumebar range
+
+ - Property "level": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_volumebar_range_set_level: Sets range value
+ - hildon_volumebar_range_get_level: Gets range current value
+
+ - Errors detected: None.
+
+ 1. Check normal usage
+ a) Set level over the threshold limit
+ b) Set level under the threshold limit
+
+ 2. Check range limits
+ a) Set level to VOLUMEBAR_RANGE_MINIMUM_VALUE
+ b) Set level to VOLUMEBAR_RANGE_MAXIMUM_VALUE
+
+ 3. Check handling of invalid values
+ a) Set level under the minimum value
+ b) Set level over the maximum value
+ c) Set level with a NULL object
+ d) Get level with a NULL object
+
+ - hildon_volumebar_range_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-code-dialog: Used to allow to enter a code.
+
+ - hildon_code_dialog_get_code: Gets the code inserted by the user.
+
+ - Errors detected: none.
+
+ 1. Check normal usage
+ a) Get code from a newly created dialog.
+
+ 2. Check handling of invalid values.
+ a) Get code from a NULL object.
+ b) Get code from an object that it is not a code dialog.
+
+ - hildon_code_dialog_clear_code: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_code_dialog_set_help_text: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-set-password-dialog: A widget that allows to set a password.
+
+ - Property "domain": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "modify_protection": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "password": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_set_password_dialog_get_protected: Get the boolean that points out if
+ password protection is active.
+
+ - Errors detected: none.
+
+ 1. Test that protection boolean is get with regular password values.
+ a) Get TRUE from modify_protection property.
+ b) Get FALSE from modify_protection property.
+
+ 2. Test that protection boolean is get with invalid password values.
+ a) Get modify_protection from a NULL object.
+
+ - hildon_set_password_dialog_get_password: Get password property from get-password-dialog.
+
+ - Errors detected: none.
+
+ 1. Test that getting password is correct with regular values.
+ a) Get password "test_password" from HildonSetPasswordDialog created with "test_password" by default.
+ b) Get password "" from HildonSetPasswordDialog created with "" by default.
+ c) Get password combining letters, numbers and symbols from HildonSetPasswordDialog created with such kind of password by default.
+
+ 2. Test that getting password is correct with invalid values.
+ a) Get empty password from HildonSetPasswordDialog created with NULL password by default.
+ b) Get password from NULL object.
+
+ - hildon_set_password_dialog_new : [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_set_password_dialog_new_with_default: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_set_password_dialog_set_domain: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-note: A widget that shows a dialog to ask confirmation from the user.
+
+ - Property "note_type": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "description": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "icon": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "progressbar": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_note_new_confirmation:
+
+ - Errors detected: none.
+
+ 1. Create confirmation note with regular values.
+ a) Create new confirmation note with description set to a combination of letters, numbers and symbols.
+ b) Create new confirmation note with description set to "".
+
+ 2. Create confirmation note with invalid values.
+ a) Create new confirmation note with window set to NULL.
+ b) Create new confirmation note with description set to NULL.
+
+ - hildon_note_new_information:
+
+ - Errors detected: none.
+
+ 1. Create information note with regular values.
+ a) Create new information note with description set to a combination of letters, numbers and symbols.
+ b) Create new information note with description set to "".
+
+ 2. Create information note with invalid values.
+ a) Create new information note with window set to NULL.
+ b) Create new information note with description set to NULL.
+
+ - hildon_note_new_confirmation_with_icon_name:
+
+ - Errors detected: none.
+
+ 1. Create confirmation with icon name note with regular values.
+ a) Create new confirmation note with description set to a combination of letters, numbers and symbols and icon name "qgn_list_cp_calibration".
+ b) Create new confirmation note with description set to "" and icon name NULL.
+
+ 2. Create confirmation with icon name note with invalid values.
+ a) Create new confirmation note with window set to NULL.
+ b) Create new confirmation note with description set to NULL.
+
+ - hildon_note_new_cancel_with_progress_bar:
+
+ - Errors detected: none.
+
+ 1. Create cancel note with progress bar with regular values.
+ a) Create new confirmation note with description set to a combination of letters, numbers and symbols and NULL GtkProgressBar.
+ b) Create new confirmation note with description set to "" and correct GtkProgressBar.
+
+ 2. Create cancel note with progress bar with invalid values.
+ a) Create new confirmation note with description set to NULL.
+ b) Create new confirmation note with window set to NULL.
+
+ - hildon_note_new_confirmation_add_buttons: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_note_new_information_with_icon_name: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_note_set_button_text: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_note_set_button_texts: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-banner: Used to show a message in a banner. Banners can show an animation icon, a
+ progress bar or only text.
+
+ - Property "parent-window": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "is-timed": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_banner_show_animation:
+
+ - Errors detected: none.
+
+ 1. Check creation of new animation banner with regular values.
+ a) Create an animation banner with NULL animation name and a text.
+ b) Create an animation banner with qgn_list_mahjong animation name and an empty text.
+
+ 2. Check creation of new animation banner with invalid values.
+ a) Create an animation banner with NULL text.
+ b) Create an animation banner with NULL window.
+
+ - hildon_banner_show_progress:
+
+ - Errors detected: none.
+
+ 1. Check creation of new banner with progress bar with regular values.
+ a) Create new progress banner with standard progress bar and an empty text.
+ b) Create new progress banner with NULL progress bar and a text.
+
+ 2. Check creation of new banner with progress bar with invalid values.
+ a) Create new progress banner with NULL text.
+ b) Create new progress banner with NULL window.
+
+ -hildon_banner_show_information : [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_banner_show_information_with_markup: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_banner_set_text: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_banner_set_markup: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_banner_set_fraction: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-wizard-dialog: Used to define a wizard dialog
+
+ - Property "wizard-notebook":
+
+ - Errors detected: none.
+
+ 1. Check set/get of a regular notebook
+ a) Set and get a valid notebook.
+
+ 2. Check handling of invalid values
+ a) Set property value to NULL.
+
+ - Property "wizard-notebook": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_wizard_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-font-selection-dialog: A dialog for font selection
+
+ - Property "family"
+
+ - Errors detected: 3.b
+ 3.b) Produces a segmentation fault
+
+ 1. Set and get regular values
+ a) Set and get a font from the middle of the available fonts list
+
+ 2. Set and get limit values
+ a) Set and get first font of the available fonts list
+ b) Set and get last font of the available fonts list
+
+ 3. Set and get invalid values
+ a) Set a non existing font
+ b) Set a NULL font
+
+ - Property "family-set"
+
+ - Errors: none.
+
+ 1. Set and get regular values
+ a) Get returns FALSE when no font is selected
+ b) Get returns TRUE when a font has been selected
+ c) Set and get of value TRUE once a font has been selected
+ d) Set and get of value FALSE
+
+ - Property "size"
+
+ - Errors: none.
+
+ 1. Set and get of regular values
+ a) Set a font size from the middle of the available sizes list
+
+ 2. Set and get limit values
+ a) Set first font size in the available sizes list
+ b) Set last font size in the available sizes list
+
+ 3. Set and get invalid values
+ a) Set negative size
+ b) Set a positive size that is not in the available sizes list
+ c) Set a positive size over the maximum allowed for the property
+
+ - Property "size-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "color": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "color-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "bold": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "bold-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "italic": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "italic-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "underline": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "underline-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "strikethrough": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "strikethrough-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "position": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "position-set": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "preview-text": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_font_selection_dialog_set_preview_text: Sets the text for the preview
+ - hildon_font_selection_dialog_get_preview_text: Returns the text for the preview
+
+ - Errors detected: none.
+
+ 1. Set and get of valid values
+ a) Tested with a sample string
+
+ 2. Set and get of invalid values
+ a) Set empty preview text
+ b) Set a NULL preview text
+ c) Set with NULL object
+ d) Set with NULL object
+
+ - hildon_font_selection_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-scroll-area: This is a helper to create Maemo specific views
+ which are using scrollable area
+
+ - hildon_scroll_area_new:
+
+ Errors detected: none.
+
+ 1. Check the construction of the scroll-area
+ a) Create a regular case of construction
+ b) Create a scroll area with a label
+
+ 2. Check the construction of the scroll-area with invalid values
+ a) Create with NULL widgets
+ b) Create with actual invalid widget instead of the scrolled-window
+ c) Create with actual invalid widget instead of the treeview
+
+----------------------------------------------------------------------------------------
+
+- hildon-window: A window object for Maemo based programs.
+
+ - hildon_window_add_with_scrollbar: Adds a widget to the window with scrollbars
+
+ Errors detected: none.
+
+ 1. Check interface with regular values
+ a) Add a non viewport child
+ b) Add a viewport child
+
+ 2. Check invalid values for this interface
+ a) Add a NULL child
+ b) Add a child to a NULL window
+ c) Add a child with a parent already set
+
+ - hildon_window_add_with_scrollbar: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_window_set_menu: [TODO]
+ - hildon_window_get_menu: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_window_add_toolbar: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_window_remove_toolbar: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_window_get_is_topmost: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-system-sound: This file is not a widget, is a library with an
+ unique call that plays a system sound.
+
+ - hildon_play_system_sound: plays a system sound
+
+ - Errors detected: none.
+
+ 1. Test playing a sound that exists
+ "/usr/share/sounds/ui-default_beep.wav"
+ a) play with the default volume
+ b) play with volume = 0
+ c) play with volume = 1
+ d) play without the gconf value that specifies the volume
+
+ 2. Test that invalid parameters do not cause problems
+ a) play the file NULL
+ b) play a file that does not exist:
+ "file_that_does_not_exist.wav"
+
+----------------------------------------------------------------------------------------
+
+- hildon-color-popup: This file does not define a new GObject, it
+ creates a HildonColorPopup inside a common GtkDialog.
+
+ - hildon_color_popup_set_color_from_sliders: sets the color
+ selected by the sliders into the color passed as argument
+
+ - Errors detected: 3.a), 3.b), 3.c)
+ 3.a), 3.b), 3.c) => raise segmentation fault because
+ there is no check of the arguments.
+
+ 1. Set a common color
+ a) Set the initial color (#33CC33)
+
+ 2. Set a limit values for colors
+ a) Set the color (65535, 65535, 65535)
+ b) Set the color (0, 0, 0)
+
+ 3. Test that invalid parameters does not cause problems
+ a) Set the color to a NULL HildonColorPopup
+ b) Set the color to a NULL GdkColor
+ c) Set the color to GtkHBox instead of a HildonColorPopup
+
+ - hildon_color_popup_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-program: Object representing a hildon program.
+
+ - Property "can-hibernate": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_program_add_window: Registers a HildonWindow as belonging
+ to a given HildonProgram
+
+ - Errors detected: 2.b), 2.c)
+ 2.b) => Raises segmentation fault.
+ 2.c) => Raises segmentation fault.
+
+ 1. Test regular usage of the add_window interface
+ a) Add a window object to the program
+ b) Add another window object to the program
+ c) Add the same window object to the program
+
+ 2. Check invalid values for the add_window interface
+ a) Add to a NULL program
+ b) Add a NULL window
+ c) Add a label instead of a window
+
+ - hildon_program_remove_window: Used to unregister a window from
+ the program
+
+ - Errors detected: none.
+
+ 1. Test regular usage of the remove_window interface
+ a) Add a window object to the program and remove it
+ b) Add another window object to the program and remove the first one
+ c) Remove a window two times
+
+ 2. Check invalid values of the remove_window interface
+ a) Remove from a NULL program
+ b) Remove a NULL window
+ c) Remove a label instead of a window
+
+ - hildon_program_set_can_hibernate: Used to set whether or not the
+ Hildon task navigator should be able to set the program to
+ hibernation in case of low memory
+
+ - Errors detected: none.
+
+ 1. Test regular usage of the set_cant_hibernate interface
+ a) Test the initial value of the property, it must be FALSE
+ b) Set a value and test if the value is correct
+
+ 2. Check invalid values of the set_can_hibernate interface
+ a) Set the property to a NULL object
+
+ - hildon_program_get_can_hibernate: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_program_set_common_menu: [TODO]
+ - hildon_program_get_common_menu: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_program_set_common_toolbar: [TODO]
+ - hildon_program_get_common_toolbar: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_program_get_is_topmost: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-composite-widget: Handles focus behavior for hildon composite widgets.
+
+ - hildon_composite_widget_focus: Handles focus behavior
+
+ - Errors detected: 2.b), 2.c)
+ 2.b) -> segmentation fault
+ 2.c) -> segmentation fault
+
+ 1. Set a common color
+ a) Check with a composite widget (hildon_time_editor)
+ b) Check with a composite widget (hildon_time_editor) inside a window
+ c) Check with a composite widget (hildon_time_editor) inside a window and focus already given to the window
+
+ 2. Test that invalid parameters do not cause problems
+ a) Check with non composite widget (gtkentry)
+ b) Check with NULL widget
+ c) Check with invalid direction (GTK_DIR_RIGHT+1)
+ d) Check with non composite widget (gtkentry) inside a window
+ e) Check with invalid direction (GTK_DIR_RIGHT+1) inside a window
+
+----------------------------------------------------------------------------------------
+
+- hildon-add-home-dialog:
+
+ - Property "name": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "new_name": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_add_home_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_add_home_dialog_get_name: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-app:
+
+ - Property "scroll-control": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "two-part-title": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "zoom": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "app-title": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "killable": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "autoregistration": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "appview": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "ui-manager": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_new_with_appview: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_appview: [TODO]
+ - hildon_app_get_appview: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_title: [TODO]
+ - hildon_app_get_title: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_two_part_title: [TODO]
+ - hildon_app_get_two_part_title: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_autoregistration: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_register_view: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_register_view_with_id: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_unregister_view: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_unregister_view_with_id: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_find_view_id: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_notify_view_changed: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_killable: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_app_set_ui_manager: [TODO]
+ - hildon_app_get_ui_manager: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-appview:
+
+ - Property "connected-adjustment": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "fullscreen-key-allowed": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "fullscreen": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "title": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "menu-ui": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_add_with_scrollbar: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_set_fullscreen_key_allowed: [TODO]
+ - hildon_appview_get_fullscreen_key_allowed: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_set_fullscreen: [TODO]
+ - hildon_appview_get_fullscreen: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_get_menu: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_set_title: [TODO]
+ - hildon_appview_get_title: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_set_connected_adjustment: [TODO]
+ - hildon_appview_get_connected_adjustment: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_appview_set_menu_ui: [TODO]
+ - hildon_appview_get_menu_ui: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+----------------------------------------------------------------------------------------
+
+- hildon-file-handling-note:
+
+ - hildon_file_handling_note_new_moving: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_new_deleting: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_new_opening: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_new_saving: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_set_fraction: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_set_counter_and_name: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_file_handling_note_set_name: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-grid:
+
+ - Property "empty_label": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "style": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "scrollbar-position": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_set_style: [TODO]
+ - hildon_grid_get_style: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_set_scrollbar_pos: [TODO]
+ - hildon_grid_get_scrollbar_pos: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_activate_child: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-grid-item:
+
+ - Property "emblem-type": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "icon-basename": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_item_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_item_new_with_label: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_item_set_emblem_type: [TODO]
+ - hildon_grid_item_get_emblem_type(: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_grid_item_set_label: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-hvolumebar:
+
+ - hildon_hvolumebar_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-vvolumebar:
+
+ - hildon_vvolumebar_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-insert-object-dialog:
+
+ - Property "name": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_insert_object_dialog_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_insert_object_dialog_get_name: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_insert_object_dialog_get_mime_type: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+----------------------------------------------------------------------------------------
+
+- hildon-telephone-editor:
+
+ - Property "country": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "area": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "number": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "show-border": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "show-plus": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - Property "set-format": [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_new: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_new_with_strings: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_editable: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_show_plus: [TODO]
+ - hildon_telephone_editor_get_show_plus: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_show_border: [TODO]
+ - hildon_telephone_editor_get_show_border: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_widths: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_get_country: [TODO]
+ - hildon_telephone_editor_set_country: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_area: [TODO]
+ - hildon_telephone_editor_get_area: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
+ - hildon_telephone_editor_set_number: [TODO]
+ - hildon_telephone_editor_get_number: [TODO]
+
+ - Errors detected:
+
+ 1. Test regular values:
+ -
+
+ 2. Test limit values:
+ -
+
+ 3. Test invalid values:
+ -
+
diff --git a/tests/check-hildon-banner.c b/tests/check-hildon-banner.c
new file mode 100644
index 0000000..cf1356e
--- /dev/null
+++ b/tests/check-hildon-banner.c
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-banner.h"
+#include "hildon-window.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWidget * b_window = NULL;
+
+static void
+fx_setup_default_banner ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ b_window = create_test_window();
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(b_window),
+ "hildon-banner: Window creation failed.");
+
+
+}
+
+static void
+fx_teardown_default_banner ()
+{
+
+ gtk_widget_destroy(b_window);
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for show_animation -----*/
+
+/**
+ * Purpose: Check creation of new animation banner with regular values
+ * Cases considered:
+ * - Create an animation banner with NULL animation name and TEST_STRING text.
+ * - Create an animation banner with qgn_list_mahjong animation name and "" text.
+ */
+START_TEST (test_show_animation_regular)
+{
+ gchar * animation_name=NULL;
+ gchar * text=NULL;
+
+ HildonBanner * hildon_banner = NULL;
+
+
+ /*Test 1: Create an animation banner with NULL animation name. */
+ text = TEST_STRING;
+ hildon_banner = HILDON_BANNER(hildon_banner_show_animation(b_window,NULL,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_animation failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+
+ /*Test 2: Create an animation banner with animation name set to "qgn_list_mahjong" and text set to "". */
+ text="";
+ animation_name = "qgn_list_mahjong";
+ hildon_banner = HILDON_BANNER(hildon_banner_show_animation(b_window,animation_name,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_animation failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+
+}
+END_TEST
+
+/**
+ * Purpose: Check creation of new animation banner with invalid values
+ * Cases considered:
+ * - Create an animation banner with NULL text.
+ * - Create an animation banner with NULL window.
+ */
+START_TEST (test_show_animation_invalid)
+{
+ gchar * animation_name=NULL;
+ gchar * text=NULL;
+
+ HildonBanner * hildon_banner = NULL;
+
+ /*Test 1: Create an animation banner with NULL text. */
+
+ hildon_banner = HILDON_BANNER(hildon_banner_show_animation(b_window,NULL,NULL));
+
+ fail_if(HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_animation failed creating banner.");
+
+ hildon_banner = NULL;
+
+ /*Test 2: Create an animation banner with NULL window. */
+ text="";
+ animation_name = "qgn_list_mahjong";
+ hildon_banner = HILDON_BANNER(hildon_banner_show_animation(NULL,animation_name,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_animation failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+
+}
+END_TEST
+
+/* ----- Test case for show_progress -----*/
+/**
+ * Purpose: Check creation of new banner with progress bar with regular values.
+ * Cases considered:
+ * - Create new progress banner with standard progress bar and "" as text.
+ * - Create new progress banner with NULL progress bar and TEST_STRING as text.
+ */
+START_TEST (test_show_progress_regular)
+{
+ gchar * text=NULL;
+
+ GtkProgressBar * progress_bar = NULL;
+ HildonBanner * hildon_banner = NULL;
+
+ progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
+
+ /*Test 1: Create progress banner with TEST_STRING as text and basic progress_bar. */
+ text = TEST_STRING;
+ hildon_banner = HILDON_BANNER(hildon_banner_show_progress(b_window,progress_bar,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_progress failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+ hildon_banner_set_fraction(hildon_banner,0.5);
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+
+ hildon_banner = NULL;
+
+ /*Test 2: Create progress banner with "" as text and NULL progress_bar. */
+ text = "";
+ hildon_banner = HILDON_BANNER(hildon_banner_show_progress(b_window,NULL,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_progress failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+ hildon_banner_set_fraction(hildon_banner,0.2);
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+
+}
+END_TEST
+
+/**
+ * Purpose: Check creation of new banner with progress bar with invalid values
+ * Cases considered:
+ * - Create new progress banner with NULL text.
+ * - Create new progress banner with NULL window.
+ */
+START_TEST (test_show_progress_invalid)
+{
+ gchar * text=NULL;
+
+ GtkProgressBar * progress_bar = NULL;
+ HildonBanner * hildon_banner = NULL;
+
+ progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
+ /*Test 1: Create progress banner with TEST_STRING as text and basic progress_bar. */
+ text = TEST_STRING;
+ hildon_banner = HILDON_BANNER(hildon_banner_show_progress(b_window,progress_bar,NULL));
+
+ /* NULL text avoid create correct banner. */
+ fail_if(HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_progress failed creating banner.");
+
+ /*Test 2: Create progress banner with TEST_STRING as text, NULL progress_bar and NULL window */
+ text = TEST_STRING;
+ hildon_banner = HILDON_BANNER(hildon_banner_show_progress(NULL,NULL,text));
+
+ fail_if(!HILDON_IS_BANNER(hildon_banner),
+ "hildon-banner: hildon_banner_show_progress failed creating banner.");
+
+ hildon_banner_set_text(hildon_banner,text);
+ hildon_banner_set_fraction(hildon_banner,0.2);
+
+ gtk_widget_destroy(GTK_WIDGET(hildon_banner));
+}
+END_TEST
+
+
+
+/* ---------- Suite creation ---------- */
+Suite *create_hildon_banner_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonBanner");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("show_animation");
+ TCase *tc2 = tcase_create("show_animation");
+
+ /* Create unit tests for hildon_banner_show_animation and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_banner, fx_teardown_default_banner);
+ tcase_add_test(tc1, test_show_animation_regular);
+ tcase_add_test(tc1, test_show_animation_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create unit tests for hildon_banner_show_animation and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_banner, fx_teardown_default_banner);
+ tcase_add_test(tc2, test_show_progress_regular);
+ tcase_add_test(tc2, test_show_progress_invalid);
+ suite_add_tcase (s, tc2);
+
+
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-calendar-popup.c b/tests/check-hildon-calendar-popup.c
new file mode 100644
index 0000000..b0e076d
--- /dev/null
+++ b/tests/check-hildon-calendar-popup.c
@@ -0,0 +1,517 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <time.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-calendar-popup.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonCalendarPopup *calendar = NULL;
+
+static void
+fx_setup_default_calendar()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ calendar = HILDON_CALENDAR_POPUP(hildon_calendar_popup_new(NULL, 2006, 4, 10));
+
+ show_test_window(GTK_WIDGET(calendar));
+
+ /* Check calendar object has been created properly */
+ fail_if(!HILDON_IS_CALENDAR_POPUP(calendar),
+ "hildon-calendar-popup: Creation failed.");
+}
+
+static void
+fx_teardown_default_calendar()
+{
+
+ gtk_widget_destroy(GTK_WIDGET(calendar));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ------ Test case for get/set_date ----- */
+
+/**
+ * Purpose: Check regular values for dates
+ * Cases considered:
+ * - Set and get date 30/03/1981
+ */
+START_TEST (test_set_get_date_regular)
+{
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+
+ /* Test1: set a valid date like 30/03/1981 */
+ year = 1981;
+ month = 3;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(year != ret_year || month != ret_month || day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned date %u/%u/%u",
+ year, month, day, ret_year, ret_month, ret_day);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check limit values for dates
+ * Cases considered:
+ * - Set and get year to max-year property
+ * - Set and get year to min-year property
+ * - Set and get month to 12
+ * - Set and get month to 1
+ * - Set and get day to 31 (March)
+ * - Set and get day to 30 (April)
+ * - Set and get day to 29 (February 2004)
+ * - Set and get day to 28 (February 2006)
+ * - Set and get day to 1
+ * - Set and get maximum allowed date (according to max-year property).
+ * - Set and get minimum allowed date (according to min-year property).
+ */
+START_TEST (test_set_get_date_limits)
+{
+ GValue value = {0, };
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+ guint max_year, min_year;
+
+ g_value_init(&value, G_TYPE_UINT);
+
+ /* Test1: Test year maximum limit */
+ max_year = 2050;
+ g_value_set_uint (&value, max_year);
+ g_object_set_property (G_OBJECT (calendar), "max-year", &value);
+ year = max_year;
+ month = 3;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with maximum year set to %u, but get date returned year %u",
+ year, month, day, max_year, ret_year);
+
+ /* Test2: Test year minimum limit */
+ min_year = 2000;
+ g_value_set_uint (&value, min_year);
+ g_object_set_property (G_OBJECT (calendar), "min-year", &value);
+ year = min_year;
+ month = 3;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with minimum year set to %u, but get date returned year %u",
+ year, month, day, min_year, ret_year);
+
+ /* Test3: Test month minimum limit */
+ year = 2006;
+ month = 1;
+ day = 10;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(month != ret_month,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned month %u",
+ year, month, day, ret_month);
+
+ /* Test4: Test month maximum limit */
+ year = 2006;
+ month = 12;
+ day = 10;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(month != ret_month,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned month %u",
+ year, month, day, ret_month);
+
+ /* Test5: Test day maximum limit */
+
+ /* 31 */
+ year = 2006;
+ month = 3;
+ day = 31;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned day %u",
+ year, month, day, ret_day);
+
+ /* 30 */
+ year = 2006;
+ month = 4;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned day %u",
+ year, month, day, ret_day);
+
+ /* February 28th */
+ year = 2006;
+ month = 2;
+ day = 28;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned day %u",
+ year, month, day, ret_day);
+
+ /* February 29th */
+ year = 2004;
+ month = 2;
+ day = 29;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned day %u",
+ year, month, day, ret_day);
+
+ /* Test6: Test day minimum limit */
+ year = 2006;
+ month = 2;
+ day = 1;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(day != ret_day,
+ "hildon-calendar-popup: Set date to %u/%u/%u, but get date returned day %u",
+ year, month, day, ret_day);
+
+ /* Test7: Test maximum allowed date */
+ max_year = 2050;
+ g_value_set_uint (&value, max_year);
+ g_object_set_property (G_OBJECT (calendar), "max-year", &value);
+ year = max_year;
+ month = 12;
+ day = 31;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with maximum year set to %u, but get date returned date %u/%u/%u",
+ year, month, day, max_year, ret_year, ret_month, ret_day);
+
+ /* Test8: Test minimum allowed date */
+ min_year = 2000;
+ g_value_set_uint (&value, min_year);
+ g_object_set_property (G_OBJECT (calendar), "min-year", &value);
+ year = min_year;
+ month = 1;
+ day = 1;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with minimum year set to %u, but get date returned date %u/%u/%u",
+ year, month, day, min_year, ret_year, ret_month, ret_day);
+}
+END_TEST
+
+/**
+ * Purpose: Check invalid values for dates
+ * Cases considered:
+ * - Set and get year above max-year property
+ * - Set and get year under min-year property
+ * - Set and get month to 13
+ * - Set and get month to 0
+ * - Set and get day to 32 (March)
+ * - Set and get day to 31 (April)
+ * - Set and get day to 30 (February 2004)
+ * - Set and get day to 29 (February 2006)
+ * - Set and get day to 0
+ * - Set and get above maximum allowed date (according to max-year property).
+ * - Set and get under minimum allowed date (according to min-year property).
+ * - Set and get date using NULL calendar object
+ */
+START_TEST (test_set_get_date_invalid)
+{
+ GValue value = {0, };
+ guint year, month, day;
+ guint valid_year, valid_month, valid_day;
+ guint current_year, current_month, current_day;
+ guint ret_year, ret_month, ret_day;
+ guint max_year, min_year;
+ GDate date;
+
+ g_value_init(&value, G_TYPE_UINT);
+
+ /* Test 1: Test above maximum year limit */
+ max_year = 2050;
+ g_value_set_uint (&value, max_year);
+ g_object_set_property (G_OBJECT (calendar), "max-year", &value);
+ year = max_year + 1;
+ month = 3;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(max_year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with maximum year set to %u, but get date returned year = %u != %u",
+ year, month, day, max_year, ret_year, max_year);
+
+ /* Test 2: Test under minimum year limit */
+ min_year = 2000;
+ g_value_set_uint (&value, min_year);
+ g_object_set_property (G_OBJECT (calendar), "min-year", &value);
+ year = min_year - 1;
+ month = 3;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if(min_year != ret_year,
+ "hildon-calendar-popup: Set date to %u/%u/%u, with minimum year set to %u, but get date returned year = %u != %u",
+ year, month, day, min_year, ret_year, min_year);
+
+ /* Test 3: Test above maximum month limit */
+ valid_year = 2006;
+ valid_month = 10;
+ valid_day = 5;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2010;
+ month = 13;
+ day = 12;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+
+ /* Test 4: Test under minimum month limit */
+ valid_year = 2006;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2010;
+ month = 0;
+ day = 10;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+
+ /* Test 5: Test above maximum day limit */
+
+ /* 31 */
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2006;
+ month = 3;
+ day = 32;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+
+ /* 30 */
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2006;
+ month = 4;
+ day = 31;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+ /* February 28th */
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2006;
+ month = 2;
+ day = 29;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+
+ /* February 29th */
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2004;
+ month = 2;
+ day = 30;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+ /* Test6: Test day minimum limit */
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = 2006;
+ month = 2;
+ day = 0;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+
+ /* Gets the curret date */
+ g_date_clear(&date, 1);
+ g_date_set_time(&date, time(NULL));
+
+ current_day = g_date_get_day(&date);
+ current_month = g_date_get_month(&date);
+ current_year = g_date_get_year(&date);
+
+ fail_if((current_year != ret_year) || (current_month != ret_month) || (current_day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, ret_year, ret_month, ret_day, current_year, current_month, current_day);
+
+ /* Test7: Test above maximum allowed date */
+ max_year = 2050;
+ g_value_set_uint (&value, max_year);
+ g_object_set_property (G_OBJECT (calendar), "max-year", &value);
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = max_year + 1;
+ month = 1;
+ day = 1;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if((max_year != ret_year) || (month != ret_month) || (day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with maximum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, max_year, ret_year, ret_month, ret_day, max_year, month, day);
+
+ /* Test8: Test minimum allowed date */
+ min_year = 2000;
+ g_value_set_uint (&value, min_year);
+ g_object_set_property (G_OBJECT (calendar), "min-year", &value);
+ valid_year = 2005;
+ valid_month = 2;
+ valid_day = 15;
+ hildon_calendar_popup_set_date(calendar, valid_year, valid_month, valid_day);
+ year = min_year - 1;
+ month = 12;
+ day = 31;
+ hildon_calendar_popup_set_date(calendar, year, month, day);
+ hildon_calendar_popup_get_date(calendar, &ret_year, &ret_month, &ret_day);
+ fail_if((min_year != ret_year) || (month != ret_month) || (day != ret_day),
+ "hildon-calendar-popup: Set valid date to %u/%u/%u, then set an invalid date %u/%u/%u, with minimum year set to %u, but get date returned %u/%u/%u instead of %u/%u/%u",
+ valid_year, valid_month, valid_day, year, month, day, min_year, ret_year, ret_month, ret_day, min_year, month, day);
+
+ /* Test9: Set and get date with NULL calendar objects */
+ hildon_calendar_popup_set_date(NULL, 2006, 10, 15);
+ hildon_calendar_popup_get_date(NULL, &year, &month, &day);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_calendar_popup_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonCalendarPopup");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_date");
+
+ /* Create test case for set_date and get_date and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_calendar, fx_teardown_default_calendar);
+ tcase_add_test(tc1, test_set_get_date_regular);
+ tcase_add_test(tc1, test_set_get_date_limits);
+ tcase_add_test(tc1, test_set_get_date_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-caption.c b/tests/check-hildon-caption.c
new file mode 100644
index 0000000..1f096b3
--- /dev/null
+++ b/tests/check-hildon-caption.c
@@ -0,0 +1,466 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkwindow.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-caption.h"
+
+#include <gtk/gtkvbox.h>
+#include "hildon-window.h"
+
+#include <libintl.h>
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonCaption *caption = NULL;
+static const gchar *DEFAULT_TEST_CAPTION = "Default caption";
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_caption()
+{
+ int argc = 0;
+ GtkWidget *control = NULL;
+ GtkWidget *icon = NULL;
+ GtkSizeGroup *group = NULL;
+
+ gtk_init(&argc, NULL);
+
+ control = gtk_entry_new();
+ caption = HILDON_CAPTION(hildon_caption_new(group,
+ DEFAULT_TEST_CAPTION,
+ control,
+ icon,
+ HILDON_CAPTION_OPTIONAL));
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (caption));
+
+ /* Displays the widget and the window */
+ show_test_window (showed_window);
+
+ show_test_window (GTK_WIDGET(caption));
+
+ /* Check that the hildon-caption object has been created properly */
+ fail_if (!HILDON_IS_CAPTION (caption), "hildon-caption: Creation failed.");
+
+}
+
+static void
+fx_teardown_default_caption()
+{
+ /* Destroy caption */
+ gtk_widget_destroy (GTK_WIDGET(caption));
+
+ /* Destroy the window */
+ gtk_widget_destroy (showed_window);
+
+}
+
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for is_mandatory -----*/
+
+/**
+ * Purpose: test getting the mandatory property of a HildonCaption
+ * Cases considered:
+ * - check an optional captioned control
+ * - check a mandatory captioned control
+ */
+
+START_TEST (test_is_mandatory_regular)
+{
+ GtkWidget *control = NULL, *icon = NULL;
+ GtkSizeGroup *group = NULL;
+
+ /* Test 1: check an optional (i.e. NOT mandatory) caption */
+ fail_if (hildon_caption_is_mandatory (caption) == TRUE,
+ "hildon-caption: The created HildonCaption has a mandatory captioned control and it shouldn't");
+
+ gtk_widget_destroy (GTK_WIDGET (caption));
+
+ /* Test 2: create a mandatory caption */
+ control = GTK_WIDGET (gtk_entry_new());
+ caption = HILDON_CAPTION (hildon_caption_new(group,
+ "Default caption",
+ control,
+ icon,
+ HILDON_CAPTION_MANDATORY));
+
+ fail_if (hildon_caption_is_mandatory (caption) == FALSE,
+ "hildon-caption: The created HildonCaption has a mandatory captioned control and it shouldn't");
+}
+END_TEST
+
+/**
+ * Purpose: test is_mandatory with invalid arguments
+ * Cases considered:
+ * - use a NULL HildonCaption
+ * - use an object that is not a HildonCaption (a HBox)
+ */
+START_TEST (test_is_mandatory_invalid)
+{
+ GtkWidget *hbox = NULL;
+
+ /* Test 1: NULL HildonCaption */
+ fail_if (hildon_caption_is_mandatory (NULL) == TRUE,
+ "hildon-caption: a NULL HildonCaption should fail and return FALSE");
+
+ /* Test 2: invalid HildonCaption */
+ hbox = gtk_hbox_new (FALSE, 0);
+ if (hildon_caption_is_mandatory ((HildonCaption *) (hbox)) == TRUE)
+ {
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+ fail ("hildon-caption: an invalid HildonCaption should return FALSE");
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+}
+END_TEST
+
+/* ----- Test case for set_status -----*/
+
+/**
+ * Purpose: test setting the status of a HildonCaption
+ * Cases considered:
+ * - Set the status HILDON_CAPTION_MANDATORY
+ */
+START_TEST (test_set_status_regular)
+{
+
+ hildon_caption_set_status (caption, HILDON_CAPTION_MANDATORY);
+
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_MANDATORY,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_MANDATORY);
+}
+END_TEST
+
+/**
+ * Purpose: test setting some status passing invalid parameters
+ * Cases considered:
+ * - set the status 8
+ * - set the status to a NULL HildonCaption
+ * - set the status to an invalid HildonCaption (use a HBox instead)
+ */
+START_TEST (test_set_status_invalid)
+{
+ const guint INVALID_ENUM = 8;
+ GtkWidget *hbox = NULL;
+
+ /* Test 1 */
+ hildon_caption_set_status (caption, INVALID_ENUM);
+
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_OPTIONAL,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_OPTIONAL);
+
+ /* Test 2 */
+ hildon_caption_set_status (NULL, HILDON_CAPTION_MANDATORY);
+
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_OPTIONAL,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_OPTIONAL);
+
+ /* Test 3 */
+ hbox = gtk_hbox_new (FALSE, 0);
+ hildon_caption_set_status ((HildonCaption *) (hbox), HILDON_CAPTION_MANDATORY);
+ if (hildon_caption_get_status (caption) != HILDON_CAPTION_OPTIONAL)
+ {
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+ fail ("hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_OPTIONAL);
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+}
+END_TEST
+
+/* ----- Test case for get_status -----*/
+
+/**
+ * Purpose: test getting the status of a HildonCaption
+ * Cases considered:
+ * - Get HILDON_CAPTION_OPTIONAL set in the method creation
+ * - Get HILDON_CAPTION_MANDATORY set with set_status
+ * - Get HILDON_CAPTION_OPTIONAL set with set_property
+ */
+START_TEST (test_get_status_regular)
+{
+ GValue value = {0, };
+
+ /* Test 1: set status in object creation */
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_OPTIONAL,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_OPTIONAL);
+
+ /* Test 2: set status with set_status */
+ hildon_caption_set_status (caption, HILDON_CAPTION_MANDATORY);
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_MANDATORY,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_MANDATORY);
+
+ /* Test 3: set status with set_property */
+ g_value_init (&value, G_TYPE_UINT);
+ g_value_set_uint (&value, HILDON_CAPTION_OPTIONAL);
+
+ g_object_set_property (G_OBJECT (caption), "status", &value);
+ fail_if (hildon_caption_get_status (caption) != HILDON_CAPTION_OPTIONAL,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (caption), HILDON_CAPTION_OPTIONAL);
+}
+END_TEST
+
+/**
+ * Purpose: test get_status with invalid values
+ * Cases considered:
+ * - Get the status with a NULL HildonCaption
+ * - Get the status with an invalid HildonCaption (used a HBox)
+ */
+START_TEST (test_get_status_invalid)
+{
+ GtkWidget *hbox = NULL;
+
+ /* Test 1: check a NULL caption */
+ fail_if (hildon_caption_get_status (NULL) != HILDON_CAPTION_OPTIONAL,
+ "hildon-caption: the returned status is %d and should be %d",
+ hildon_caption_get_status (NULL), HILDON_CAPTION_OPTIONAL);
+
+ /* Test 2: check an invalid HildonCaption */
+ hbox = gtk_hbox_new (FALSE, 0);
+ if (hildon_caption_get_status ((HildonCaption *) (hbox)) != HILDON_CAPTION_OPTIONAL)
+ {
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+ fail ("hildon-caption: an invalid HildonCaption should return HILDON_CAPTION_OPTIONAL");
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+}
+END_TEST
+
+/* ----- Test case for set_label -----*/
+
+/**
+ * Purpose: test setting labels for a HildonCaption
+ * Cases considered:
+ * - Set a test label
+ * - Set an empty label
+ */
+START_TEST (test_set_label_regular)
+{
+ const gchar *TEST_LABEL = TEST_STRING;
+ gchar * expected_ret_label=NULL;
+
+ /* We control i18n so we will never set it properly because apparently it will not be useful for testing */
+ /* so _("ecdg_ti_caption_separato") should return the same result that "ecdg_ti_caption_separator" */
+ /* If in the future we decide activate internationalization we must modify test implementation */
+ expected_ret_label = g_strconcat(TEST_LABEL,"ecdg_ti_caption_separator",NULL);
+
+ /* Test 1 */
+ hildon_caption_set_label (caption, TEST_LABEL);
+
+ /* fail_if (strcmp (hildon_caption_get_label (caption), TEST_LABEL) != 0,
+ "hildon-caption: the returned label is %s and should be %s",
+ hildon_caption_get_label (caption), TEST_LABEL);
+ */
+ fail_if (strcmp (hildon_caption_get_label (caption), expected_ret_label) != 0,
+ "hildon-caption: the returned label is %s and should be %s",
+ hildon_caption_get_label (caption), expected_ret_label);
+
+ g_free(expected_ret_label);
+
+ /* Test 2 */
+ hildon_caption_set_label (caption, "");
+
+ fail_if (strcmp (hildon_caption_get_label (caption),"ecdg_ti_caption_separator") != 0,
+ "hildon-caption: the returned label is %s and should be default separator",
+ hildon_caption_get_label (caption));
+}
+END_TEST
+
+/**
+ * Purpose: test setting labels with invalid parameters
+ * Cases considered:
+ * - Set a NULL label
+ * - set a label to a NULL HildonCaption
+ * - set a label to an invalid HildonCaption (use a GtkHbox instead)
+ */
+START_TEST (test_set_label_invalid)
+{
+ const gchar *TEST_LABEL = TEST_STRING;
+ GtkWidget *hbox = NULL;
+
+ /* Test 1 */
+ hildon_caption_set_label (caption, NULL);
+
+ fail_if (strcmp (hildon_caption_get_label (caption), "") != 0,
+ "hildon-caption: the returned label is %s and should be empty",
+ hildon_caption_get_label (caption));
+
+ /* Test 2 */
+ hildon_caption_set_label (NULL, TEST_LABEL);
+
+ fail_if (strcmp (hildon_caption_get_label (caption), "") != 0,
+ "hildon-caption: the returned label is %s and should be default separator",
+ hildon_caption_get_label (caption), "");
+
+ /* Test 3 */
+ hbox = gtk_hbox_new (FALSE, 0);
+ hildon_caption_set_label ((HildonCaption *) (hbox), TEST_LABEL);
+ if (strcmp (hildon_caption_get_label ((HildonCaption *) (hbox)), "")!=0)
+ {
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+ fail ("hildon-caption: an invalid HildonCaption should return NULL");
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+}
+END_TEST
+
+/* ----- Test case for get_label -----*/
+
+/**
+ * Purpose: test getting a valid value for a label previously set
+ * Cases considered:
+ * - get label set with set_label
+ * - get empty label set with set_label
+ */
+START_TEST (test_get_label_regular)
+{
+ const gchar *TEST_LABEL = TEST_STRING;
+ gchar * expected_ret_label=NULL;
+
+ /* Test 1 */
+ hildon_caption_set_label (caption, TEST_LABEL);
+ expected_ret_label = g_strconcat(TEST_LABEL,"ecdg_ti_caption_separator",NULL);
+
+ fail_if (strcmp (hildon_caption_get_label (caption), expected_ret_label) != 0,
+ "hildon-caption: the returned label is %s and should be %s",
+ hildon_caption_get_label (caption), expected_ret_label);
+
+ g_free(expected_ret_label);
+
+ /* Test 2 */
+ hildon_caption_set_label (caption, "");
+
+ fail_if (strcmp (hildon_caption_get_label (caption), "ecdg_ti_caption_separator") != 0,
+ "hildon-caption: the returned label is %s and should be default separator",
+ hildon_caption_get_label (caption));
+}
+END_TEST
+
+/**
+ * Purpose: test getting labels with invalid arguments
+ * Cases considered:
+ * - get NULL label set with set_property
+ * - get the default label with a NULL HildonCaption
+ * - get the default label with an invalid HildonCaption (used a GtkHBox instead)
+ */
+START_TEST (test_get_label_invalid)
+{
+ GValue value = {0, };
+ GtkWidget *hbox = NULL;
+ const gchar *EMPTY_STRING = "";
+
+ /* Test 1 */
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string (&value, NULL);
+ g_object_set_property (G_OBJECT (caption), "label", &value);
+
+ fail_if (strcmp(hildon_caption_get_label (caption), EMPTY_STRING) != 0,
+ "hildon-caption: the returned label is %s and should be empty",
+ hildon_caption_get_label (caption));
+
+ /* Test 2: check a NULL caption */
+ fail_if (strcmp (hildon_caption_get_label (NULL), EMPTY_STRING) != 0,
+ "hildon-caption: the returned label is %s and should be empty",
+ hildon_caption_get_label (NULL));
+
+ /* Test 3: check an invalid HildonCaption */
+ hbox = gtk_hbox_new (FALSE, 0);
+ if (strcmp (hildon_caption_get_label ((HildonCaption *) (hbox)), EMPTY_STRING))
+ {
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+ fail ("hildon-caption: an invalid HildonCaption should return %s", EMPTY_STRING);
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (hbox));
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_caption_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonCaption");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("is_mandatory");
+ TCase *tc2 = tcase_create("set_status");
+ TCase *tc3 = tcase_create("get_status");
+ TCase *tc4 = tcase_create("set_label");
+ TCase *tc5 = tcase_create("get_label");
+
+ /* Create test case for is_mandatory and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_caption, fx_teardown_default_caption);
+ tcase_add_test(tc1, test_is_mandatory_regular);
+ tcase_add_test(tc1, test_is_mandatory_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for set_status and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_caption, fx_teardown_default_caption);
+ tcase_add_test(tc2, test_set_status_regular);
+ tcase_add_test(tc2, test_set_status_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for get_status and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_caption, fx_teardown_default_caption);
+ tcase_add_test(tc3, test_get_status_regular);
+ tcase_add_test(tc3, test_get_status_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Create test case for set_label and add it to the suite */
+ tcase_add_checked_fixture(tc4, fx_setup_default_caption, fx_teardown_default_caption);
+ tcase_add_test(tc4, test_set_label_regular);
+ tcase_add_test(tc4, test_set_label_invalid);
+ suite_add_tcase (s, tc4);
+
+ /* Create test case for get_label and add it to the suite */
+ tcase_add_checked_fixture(tc5, fx_setup_default_caption, fx_teardown_default_caption);
+ tcase_add_test(tc5, test_get_label_regular);
+ tcase_add_test(tc5, test_get_label_invalid);
+ suite_add_tcase (s, tc5);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-code-dialog.c b/tests/check-hildon-code-dialog.c
new file mode 100644
index 0000000..0ba22a2
--- /dev/null
+++ b/tests/check-hildon-code-dialog.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include <glib/gprintf.h>
+#include <string.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-code-dialog.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonCodeDialog *code_dialog = NULL;
+
+static void
+fx_setup_default_code_dialog()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ code_dialog = HILDON_CODE_DIALOG(hildon_code_dialog_new());
+ /* Check code_dialog object has been created properly */
+ fail_if(!HILDON_IS_CODE_DIALOG(code_dialog),
+ "hildon-code-dialog: Creation failed.");
+
+ show_test_window(GTK_WIDGET(code_dialog));
+
+}
+
+static void
+fx_teardown_default_code_dialog()
+{
+
+ /* Destroy the dialog */
+ gtk_widget_destroy (GTK_WIDGET (code_dialog));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for get_code -----*/
+/**
+ * Purpose: Check that the regular code values are get without problems
+ *
+ * Cases considered:
+ * - Get code from new created dialog.
+ *
+ */
+START_TEST (test_get_code_regular)
+{
+ const gchar * code;
+
+ /* Test 1: Get code from new created dialog. */
+ /* Check that code is correctly get. */
+ code = hildon_code_dialog_get_code (code_dialog);
+ fail_if (strcmp (code,"") != 0,
+ "hildon-code-dialog: init code isn't empty");
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that the regular code values are get without problems
+ *
+ * Cases considered:
+ * - Get code from NULL object
+ * - Get code from object that isn't a code dialog.
+ *
+ */
+START_TEST (test_get_code_invalid)
+{
+ const gchar * code;
+ GtkWidget *aux_object = NULL;
+
+ /* Test 1: Get code from NULL object. */
+ code = hildon_code_dialog_get_code (NULL);
+
+ /* Test 2: Get code from object that it isn't a code dialog. */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ code = hildon_code_dialog_get_code ((HildonCodeDialog *) aux_object);
+
+ gtk_widget_destroy (aux_object);
+
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+Suite *create_hildon_code_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonCodeDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("get_code");
+
+ /* Create test case for hildon_code_dialog_get_code and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_code_dialog, fx_teardown_default_code_dialog);
+ tcase_add_test(tc1, test_get_code_regular);
+ tcase_add_test(tc1, test_get_code_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-color-button.c b/tests/check-hildon-color-button.c
new file mode 100644
index 0000000..6792da5
--- /dev/null
+++ b/tests/check-hildon-color-button.c
@@ -0,0 +1,376 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-color-button.h"
+
+/* -------------------- Fixtures -------------------- */
+static HildonColorButton *color_button = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_color_button()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ color_button = HILDON_COLOR_BUTTON(hildon_color_button_new());
+ /* Check that the color button object has been created properly */
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (color_button));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+
+ fail_if(!HILDON_IS_COLOR_BUTTON(color_button),
+ "hildon-color-button: Creation failed.");
+
+}
+
+static void
+fx_teardown_default_color_button()
+{
+
+ /* Destroy the widget and the window */
+ gtk_widget_destroy(GTK_WIDGET(showed_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_color -----*/
+/**
+ * Purpose: Check that a regular color can be set safely
+ * Cases considered:
+ * - Set color defined by (255, 255, 255) and pixel = 255
+ * - Set color defined by (10, 20, 30) and pixel = 10
+ * - Set color defined by (20, 10, 30) and pixel = 10
+ * - Set color defined by (30, 10, 20) and pixel = 20
+ */
+
+START_TEST (test_set_color_regular)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ GdkColor * ret_color;
+ guint red;
+ guint green;
+ guint blue;
+ guint pixel;
+
+ b_color = gdk_color_copy(&color);
+
+ /* Test 1: Set color defined by (255,255,255)*/
+ red = 255;
+ green = 255;
+ blue = 255;
+ pixel = 255;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 2: Set color defined by (10,20,30)*/
+ red = 10;
+ green = 20;
+ blue = 30;
+ pixel = 10;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 3: Set color defined by (20,10,30)*/
+ red = 20;
+ green = 10;
+ blue = 30;
+ pixel = 10;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 4: Set color defined by (30,10,20)*/
+ red = 30;
+ green = 10;
+ blue = 20;
+ pixel = 20;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ gdk_color_free(b_color);
+}
+END_TEST
+
+/**
+ * Purpose: Check that a limits values on color components can be set safely.
+ * Cases considered:
+ * - Set color defined by (0, 0, 0) and pixel = 0
+ * - Set color defined by (G_MAXUINT16, G_MAXUINT16, G_MAXUINT16) and pixel = G_MAXUINT32
+ * - Set color defined by (G_MAXUINT16, 0, 0) and pixel = G_MAXUINT32
+ * - Set color defined by (0, G_MAXUINT16, 0) and pixel = 0
+ * - Set color defined by (0, 0, G_MAXUINT16) and pixel = G_MAXUINT32
+ */
+
+START_TEST (test_set_color_limits)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ GdkColor * ret_color;
+ guint red;
+ guint green;
+ guint blue;
+ guint pixel;
+
+ b_color = gdk_color_copy(&color);
+
+ /* Test 1: Set color defined by (0,0,0)*/
+ red = 0;
+ green = 0;
+ blue = 0;
+ pixel = 0;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 2: Set color defined by (G_MAXUINT16,G_MAXUINT16,G_MAXUINT16)*/
+ red = G_MAXUINT16;
+ green = G_MAXUINT16;
+ blue = G_MAXUINT16;
+ pixel = G_MAXUINT32;
+
+ b_color->pixel=pixel;
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 3: Set color defined by (G_MAXUINT16,0,0)*/
+ red = G_MAXUINT16;
+ green = 0;
+ blue = 0;
+ pixel = G_MAXUINT32;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 4: Set color defined by (0,G_MAXUINT16,0)*/
+ red = 0;
+ green = G_MAXUINT16;
+ blue = 0;
+ pixel = 0;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ /* Test 5: Set color defined by (0,0,G_MAXUINT16)*/
+ red = 0;
+ green = 0;
+ blue = G_MAXUINT16;
+ pixel = G_MAXUINT32;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=pixel;
+
+ hildon_color_button_set_color(color_button,b_color);
+ ret_color = hildon_color_button_get_color(color_button);
+
+ fail_if ((red != ret_color->red) || (green != ret_color->green) ||
+ (blue != ret_color->blue) || (pixel != ret_color->pixel),
+ "hildon-color-button: The returned color for the pixel %d (returned %d) in RGB is %d/%d/%d and should be %d/%d/%d",
+ pixel, ret_color->red, ret_color->green,
+ ret_color->blue, ret_color->pixel);
+
+ ret_color = NULL;
+ gdk_color_free(b_color);
+}
+END_TEST
+
+/**
+ * Purpose: Check that a limits values on color components can be set safely.
+ * Cases considered:
+ * - Set color defined by (0, 0, 0) on NULL object.
+ * - Get color from NULL object.
+ * - Set color defined by (0, 0, 0) on GtkHBox object.
+ * - Get a color from GtkHBox object.
+ */
+
+START_TEST (test_set_color_invalid)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ GdkColor * ret_color;
+ GtkWidget *aux_object = NULL;
+ guint red;
+ guint green;
+ guint blue;
+
+ b_color = gdk_color_copy(&color);
+
+ red = 0;
+ green = 0;
+ blue = 0;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+ b_color->pixel=0;
+
+ /* Test 1: Set color defined by (0,0,0) on NULL object*/
+ hildon_color_button_set_color(NULL,b_color);
+
+ /* Test 2: Get color from NULL object*/
+ ret_color = hildon_color_button_get_color(NULL);
+
+ /* Test 3: Set color defined by (0, 0, 0) on GtkHBox object. */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ hildon_color_button_set_color((HildonColorButton *) (aux_object), b_color);
+ gdk_color_free(b_color);
+
+ /* Test 4: Get color from GtkHBox object. */
+ ret_color = hildon_color_button_get_color((HildonColorButton *) (aux_object));
+
+ if (ret_color != NULL)
+ {
+ gtk_widget_destroy(aux_object);
+ fail ("hildon-color-button: get_color must not return any object");
+ }
+
+ gtk_widget_destroy(aux_object);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_color_button_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonColorButton");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_color");
+
+ /* Create test case for hildon_color_button_set_color and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_color_button, fx_teardown_default_color_button);
+ tcase_add_test(tc1, test_set_color_regular);
+ tcase_add_test(tc1, test_set_color_limits);
+ tcase_add_test(tc1, test_set_color_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-color-popup.c b/tests/check-hildon-color-popup.c
new file mode 100644
index 0000000..b2194d8
--- /dev/null
+++ b/tests/check-hildon-color-popup.c
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-color-popup.h"
+#include "hildon-window.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWindow *window = NULL;
+static GtkWidget *dialog_color_popup = NULL;
+static HildonColorPopup color_popup;
+static GdkColor initial_color;
+
+static void
+fx_setup_default_color_popup ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ gdk_color_parse ("#33CC33", &initial_color);
+
+ window = GTK_WINDOW(create_test_window());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(window),
+ "hildon-color-popup: Window creation failed.");
+
+ dialog_color_popup = hildon_color_popup_new (window, &initial_color, &color_popup);
+
+ show_all_test_window(GTK_WIDGET(window));
+ show_all_test_window(GTK_WIDGET(dialog_color_popup));
+
+ /* Check that the color popup object has been created properly */
+ fail_if (!GTK_IS_WIDGET(dialog_color_popup),
+ "hildon-color-popup: Creation failed.");
+
+}
+
+static void
+fx_teardown_default_color_popup ()
+{
+ gtk_widget_destroy (GTK_WIDGET (window));
+}
+/* -------------------- Test cases -------------------- */
+/* ----- Test case for set_color_from_sliders -----*/
+
+static guint16
+round_color (guint16 color)
+{
+ return ((color >> 11) & 0x1F) << 11;
+}
+
+/**
+ * Purpose: test getting the color currently set in the sliders
+ * Cases considered:
+ * - Set the initial color
+ */
+START_TEST (test_set_color_from_sliders_regular)
+{
+ GdkColor color;
+
+ hildon_color_popup_set_color_from_sliders (&color, &color_popup);
+
+ fail_if ((color.red != round_color (initial_color.red)) || (color.green != round_color (initial_color.green)) ||
+ (color.blue != round_color (initial_color.blue)),
+ "hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ color.red, color.green, color.blue,
+ round_color (initial_color.red), round_color (initial_color.green), round_color (initial_color.blue));
+}
+END_TEST
+
+/**
+ * Purpose: test setting limit values for colors
+ * Cases considered:
+ * - Set color (65535, 65535, 65535)
+ * - Set color (0, 0, 0)
+ */
+START_TEST (test_set_color_from_sliders_limits)
+{
+ GdkColor color, ret_color;
+
+ /* Destroy the popup */
+ gtk_widget_destroy (GTK_WIDGET (window));
+
+ /* Test 1 */
+ color.red = 65535;
+ color.green = 65535;
+ color.blue = 65535;
+
+ window = GTK_WINDOW(hildon_window_new());
+ dialog_color_popup = hildon_color_popup_new (window, &color, &color_popup);
+
+ hildon_color_popup_set_color_from_sliders (&ret_color, &color_popup);
+
+ fail_if ((ret_color.red != round_color (color.red)) || (ret_color.green != round_color (color.green)) ||
+ (ret_color.blue != round_color (color.blue)),
+ "hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color.red, ret_color.green, ret_color.blue,
+ round_color (color.red), round_color (color.green), round_color (color.blue));
+
+ /* Destroy the popup */
+ gtk_widget_destroy (GTK_WIDGET (window));
+
+ /* Test 2 */
+ color.red = 0;
+ color.green = 0;
+ color.blue = 0;
+
+ window = GTK_WINDOW(hildon_window_new());
+ dialog_color_popup = hildon_color_popup_new (window, &color, &color_popup);
+
+ hildon_color_popup_set_color_from_sliders (&ret_color, &color_popup);
+
+ fail_if ((ret_color.red != round_color (color.red)) || (ret_color.green != round_color (color.green)) ||
+ (ret_color.blue != round_color (color.blue)),
+ "hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color.red, ret_color.green, ret_color.blue,
+ round_color (color.red), round_color (color.green), round_color (color.blue));
+}
+END_TEST
+
+/**
+ * Purpose: test that invalid values do not cause problems
+ * Cases considered:
+ * - Set color to a NULL popup
+ * - Set color to a NULL GdkColor
+ * - Set color to a GtkBox instead of a HildonColorPopup
+ */
+START_TEST (test_set_color_from_sliders_invalid)
+{
+ GdkColor color;
+ GtkWidget *hbox = NULL;
+
+ /* Test 1 */
+ hildon_color_popup_set_color_from_sliders (&color, NULL);
+
+ fail_if ((color.red != round_color (initial_color.red)) || (color.green != round_color (initial_color.green)) ||
+ (color.blue != round_color (initial_color.blue)),
+ "hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ color.red, color.green, color.blue,
+ round_color (initial_color.red), round_color (initial_color.green), round_color (initial_color.blue));
+
+ /* Test 2 */
+ hildon_color_popup_set_color_from_sliders (NULL, &color_popup);
+
+ fail_if ((color.red != round_color (initial_color.red)) || (color.green != round_color (initial_color.green)) ||
+ (color.blue != round_color (initial_color.blue)),
+ "hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ color.red, color.green, color.blue,
+ round_color (initial_color.red), round_color (initial_color.green), round_color (initial_color.blue));
+
+ /* Test 3 */
+ hbox = gtk_hbox_new (FALSE, 0);
+
+ color.red = 0;
+ color.green = 0;
+ color.blue = 0;
+
+ hildon_color_popup_set_color_from_sliders (&color, (HildonColorPopup*) hbox);
+
+ if ((color.red != 0) || (color.green != 0) || (color.blue != 0))
+ {
+ gtk_widget_destroy (hbox);
+ fail ("hildon-color-popup: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ color.red, color.green, color.blue, 0, 0, 0);
+ }
+
+ gtk_widget_destroy (hbox);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_color_popup_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonColorPopup");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_color_from_sliders");
+
+ /* Create test cases and add them to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_color_popup, fx_teardown_default_color_popup);
+ tcase_add_test(tc1, test_set_color_from_sliders_regular);
+ tcase_add_test(tc1, test_set_color_from_sliders_limits);
+ tcase_add_test(tc1, test_set_color_from_sliders_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-color-selector.c b/tests/check-hildon-color-selector.c
new file mode 100644
index 0000000..f1f14cf
--- /dev/null
+++ b/tests/check-hildon-color-selector.c
@@ -0,0 +1,307 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-color-selector.h"
+#include "hildon-window.h"
+
+#define MAX_COLOR 65535
+
+/* -------------------- Fixtures -------------------- */
+static HildonColorSelector *color_selector = NULL;
+static GtkWindow * cs_window;
+
+static void
+fx_setup_default_color_selector ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ cs_window = GTK_WINDOW(create_test_window());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(cs_window),
+ "hildon-color-selector: Window creation failed.");
+
+ color_selector = HILDON_COLOR_SELECTOR(hildon_color_selector_new(cs_window));
+ /* Check that the color selector object has been created properly */
+ fail_if(!HILDON_IS_COLOR_SELECTOR(color_selector),
+ "hildon-color-selector: Creation failed.");
+
+ show_all_test_window(GTK_WIDGET(cs_window));
+ show_all_test_window(GTK_WIDGET(color_selector));
+
+}
+
+static void
+fx_teardown_default_color_selector ()
+{
+ gtk_widget_destroy (GTK_WIDGET (color_selector));
+ gtk_widget_destroy (GTK_WIDGET (cs_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_color -----*/
+
+/**
+ * Purpose: Check that regular base colors are set and get properly
+ * Cases considered:
+ * - Set the color #33CC33.
+ */
+START_TEST (test_set_color_regular)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ const GdkColor * ret_color;
+
+ /* Test 1: Set the color #33CC33*/
+ gdk_color_parse( "#33CC33", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((b_color->red != ret_color->red) || (b_color->green != ret_color->green) ||
+ (b_color->blue != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ b_color->red, b_color->green, b_color->blue);
+
+ gdk_color_free(b_color);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limits base colors are set and get properly
+ * Cases considered:
+ * - Set and get base color defined by #000000.
+ * - Set and get base color defined by #FFFFFF.
+ * - Set and get base color defined by #FF0000.
+ * - Set and get base color defined by #0000FF.
+ */
+START_TEST (test_set_color_limits)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ const GdkColor * ret_color;
+
+ /* Check that the color selector object has been created properly */
+ fail_if(!HILDON_IS_COLOR_SELECTOR(color_selector),
+ "hildon-color-selector: Creation failed.");
+
+ b_color = gdk_color_copy(&color);
+
+ /* Test 1: Set the color #000000 */
+ gdk_color_parse( "#000000", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((b_color->red != ret_color->red) || (b_color->green != ret_color->green) ||
+ (b_color->blue != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ b_color->red, b_color->green, b_color->blue);
+
+ gdk_color_free(b_color);
+
+
+ /* Test 2: Set the color #FFFFFF */
+ gdk_color_parse( "#000000", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((b_color->red != ret_color->red) || (b_color->green != ret_color->green) ||
+ (b_color->blue != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ b_color->red, b_color->green, b_color->blue);
+
+ gdk_color_free(b_color);
+
+
+ /* Test 3: Set the color #FF0000 */
+ gdk_color_parse( "#FF0000", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((b_color->red != ret_color->red) || (b_color->green != ret_color->green) ||
+ (b_color->blue != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ b_color->red, b_color->green, b_color->blue);
+
+ gdk_color_free(b_color);
+
+ /* Test 4: Set the color to #0000FF*/
+ gdk_color_parse( "#0000FF", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((b_color->red != ret_color->red) || (b_color->green != ret_color->green) ||
+ (b_color->blue != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ b_color->red, b_color->green, b_color->blue);
+
+ gdk_color_free(b_color);
+}
+END_TEST
+/**
+ * Purpose: Check that invalid base colors are set and get properly
+ * Cases considered:
+ * - Set and get base color defined by #00FFFF and pixel 0.
+ * - Set and get base color defined by #0ABCDE and pixel 0.
+ * - Set and get base color defined by #FF00FF and pixel 0.
+ * - Set the color (65536,65536,65536).
+ * - Set and get base color defined by NULL color.
+ * - Set base color on NULL object.
+ * - Get base color from NULL object.
+ */
+START_TEST (test_set_color_invalid)
+{
+ GdkColor color;
+ GdkColor * b_color;
+ const GdkColor * ret_color;
+ guint red;
+ guint green;
+ guint blue;
+
+ /* Check that the color selector object has been created properly */
+ fail_if(!HILDON_IS_COLOR_SELECTOR(color_selector),
+ "hildon-color-selector: Creation failed.");
+
+ b_color = gdk_color_copy(&color);
+
+ /* Initialize color to check that invalid values doesn't set colors*/
+ gdk_color_parse( "#000000", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ gdk_color_free(b_color);
+
+ /* Test 1: Set the color #00FFFF*/
+ gdk_color_parse( "#00FFFF", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((0 != ret_color->red) || (0 != ret_color->green) || (0 != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ 0, 0, 0);
+
+ gdk_color_free(b_color);
+
+ /* Test 2: Set the color #FFFFFF */
+ gdk_color_parse( "#0ABCDE", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((0 != ret_color->red) || (0 != ret_color->green) || (0 != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ 0, 0, 0);
+
+ gdk_color_free(b_color);
+
+ /* Test 2: Set the color #FF00FF */
+ gdk_color_parse( "#FF00FF", &color);
+ b_color = gdk_color_copy(&color);
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((0 != ret_color->red) || (0 != ret_color->green) || (0 != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ 0, 0, 0);
+
+ gdk_color_free(b_color);
+
+ /* Test 3: Set the color (65536,65536,65536)*/
+ gdk_color_parse( "#000000", &color);
+ b_color = gdk_color_copy(&color);
+ red = MAX_COLOR+1;
+ green = MAX_COLOR+1;
+ blue = MAX_COLOR+1;
+
+ b_color->red=red;
+ b_color->green=green;
+ b_color->blue=blue;
+
+ hildon_color_selector_set_color(color_selector,b_color);
+ ret_color = hildon_color_selector_get_color(color_selector);
+
+ fail_if ((0 != ret_color->red) || (0 != ret_color->green) || (0 != ret_color->blue),
+ "hildon-color-selector: The returned RGB color is %i/%i/%i and should be %i/%i/%i",
+ ret_color->red, ret_color->green, ret_color->blue,
+ 0, 0, 0);
+
+ /* Test 5: Set the color NULL on color selector*/
+ hildon_color_selector_set_color(color_selector,NULL);
+
+ /* Test 6: Set the color on NULL object*/
+ hildon_color_selector_set_color(NULL,b_color);
+
+ /* Test 7: Get color from NULL object*/
+ ret_color = hildon_color_selector_get_color(NULL);
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_color_selector_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonColorSelector");
+
+ /* Create test case for hildon_color_selector_set_color and add it to the suite */
+ TCase *tc1 = tcase_create("set_color");
+ tcase_add_checked_fixture(tc1, fx_setup_default_color_selector, fx_teardown_default_color_selector);
+ tcase_add_test(tc1, test_set_color_regular);
+ tcase_add_test(tc1, test_set_color_limits);
+ tcase_add_test(tc1, test_set_color_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-composite-widget.c b/tests/check-hildon-composite-widget.c
new file mode 100644
index 0000000..10fca91
--- /dev/null
+++ b/tests/check-hildon-composite-widget.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkwindow.h>
+#include <gtk/gtkentry.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include <unistd.h>
+
+#include "hildon-composite-widget.h"
+#include "hildon-time-editor.h"
+
+/* -------------------- Fixtures ---------------------- */
+
+static void
+fx_setup_gtk ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+}
+
+static void
+fx_teardown_gtk ()
+{
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for focus -----*/
+
+/**
+ * Purpose: Test regular usage
+ * Cases considered:
+ * - Check with a composite widget (hildon_time_editor)
+ * - Check with a composite widget (hildon_time_editor) inside a window
+ * - check with a composite widget (hildon_time_editor) inside a window and a focus already given to the window
+ */
+START_TEST (test_focus_regular)
+{
+ GtkWidget *time_editor;
+ GtkWindow *window;
+
+ /* Test1: check with a composite widget */
+ time_editor = hildon_time_editor_new();
+
+ hildon_composite_widget_focus(time_editor, GTK_DIR_RIGHT);
+
+ gtk_widget_destroy(GTK_WIDGET(time_editor));
+
+ /* Test2: check with a composite widget (inside a window) */
+ window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ time_editor = hildon_time_editor_new();
+ gtk_container_add(GTK_CONTAINER(window), time_editor);
+
+ /* show widget */
+ show_all_test_window(GTK_WIDGET(window));
+
+ hildon_composite_widget_focus(time_editor, GTK_DIR_RIGHT);
+
+ gtk_widget_destroy(GTK_WIDGET(window));
+
+ /* Test3: check with a composite widget (hildon_time_editor) inside a window and a focus already given to the window */
+ window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ time_editor = hildon_time_editor_new();
+ gtk_container_add(GTK_CONTAINER(window), time_editor);
+
+ /* show widget */
+ show_all_test_window(GTK_WIDGET(window));
+ gtk_widget_grab_focus(GTK_WIDGET(window));
+ hildon_composite_widget_focus(time_editor, GTK_DIR_RIGHT);
+
+ gtk_widget_destroy(GTK_WIDGET(window));
+}
+END_TEST
+
+/**
+ * Purpose: Test invalid usage
+ * Cases considered:
+ * - Check with non composite widget (gtkentry)
+ * - Check with NULL object
+ * - Check with invalid direction
+ * - Check with non composite widget (gtkentry) (inside a window)
+ * - Check with invalid direction (inside a window)
+ */
+START_TEST (test_focus_invalid)
+{
+ GtkWidget *time_editor, *entry;
+ GtkWindow *window;
+
+ /* Test1: check with a composite widget */
+ entry = gtk_entry_new();
+ hildon_composite_widget_focus(entry, GTK_DIR_RIGHT);
+
+ gtk_widget_destroy(GTK_WIDGET(entry));
+
+ /* Test2: with NULL widget */
+ hildon_composite_widget_focus(NULL, GTK_DIR_RIGHT);
+
+ /* Test3: with invalid direction */
+ time_editor = hildon_time_editor_new();
+ hildon_composite_widget_focus(time_editor,GTK_DIR_RIGHT+1);
+
+ gtk_widget_destroy(GTK_WIDGET(time_editor));
+
+ /* Test4: Check with non composite widget (gtkentry) (inside a window) */
+ window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ entry = gtk_entry_new();
+ gtk_container_add(GTK_CONTAINER(window), entry);
+
+ show_all_test_window(GTK_WIDGET(window));
+ hildon_composite_widget_focus(entry, GTK_DIR_RIGHT);
+
+ gtk_widget_destroy(GTK_WIDGET(window));
+
+ /* Test5: Check with invalid direction (inside a window) */
+ window = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
+ time_editor = hildon_time_editor_new();
+ gtk_container_add(GTK_CONTAINER(window), time_editor);
+
+ show_all_test_window(GTK_WIDGET(window));
+ hildon_composite_widget_focus(time_editor, GTK_DIR_RIGHT+1);
+
+ gtk_widget_destroy(GTK_WIDGET(window));
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_composite_widget_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonCompositeWidget");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("focus");
+
+ /* Create test case for focus and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_gtk, fx_teardown_gtk);
+ tcase_add_test(tc1, test_focus_regular);
+ tcase_add_test(tc1, test_focus_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-controlbar.c b/tests/check-hildon-controlbar.c
new file mode 100644
index 0000000..40f5be2
--- /dev/null
+++ b/tests/check-hildon-controlbar.c
@@ -0,0 +1,416 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkcontainer.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-controlbar.h"
+
+/* -------------------- Fixtures -------------------- */
+static HildonControlbar *controlbar = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_controlbar ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ controlbar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ /* Check controlbar object has been created properly */
+ fail_if(!HILDON_IS_CONTROLBAR(controlbar),
+ "hildon-controlbar: Creation failed.");
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (controlbar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+}
+
+static void
+fx_teardown_default_controlbar ()
+{
+
+ /* Destroy the widget and the window */
+ gtk_widget_destroy (GTK_WIDGET(showed_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_range -----*/
+/**
+ * Purpose: Check that regular range values are set and get properly
+ * Cases considered:
+ * - Set a range of [20,1000].
+ * - Set a range of [20,20].
+ */
+START_TEST (test_set_range_regular)
+{
+ gint init_min;
+ gint init_max;
+ gint min;
+ gint max;
+
+ /* Test 1: Set a range of [20,1000] */
+ init_min = 20;
+ init_max = 1000;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ min = hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != init_min,
+ "hildon-controlbar: The returned min is %d and should be %d",
+ min, init_min);
+
+ max = hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != init_max,
+ "hildon-controlbar: The returned max is %d and should be %d",
+ max, init_max);
+
+ /* Test 2: Set a range of [20, 20] */
+ init_min = 20;
+ init_max = 20;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ min = hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != init_min,
+ "hildon-controlbar: The returned min is %d and should be %d",
+ min, init_min);
+
+ max = hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != init_max,
+ "hildon-controlbar: The returned max is %d and should be %d",
+ max, init_max);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limits range values are set and get properly
+ * Cases considered:
+ * - Set a range of [0,G_MAXINT-1].
+ */
+START_TEST (test_set_range_limits)
+{
+ gint init_min;
+ gint init_max;
+ gint min;
+ gint max;
+
+ /* Test 1: Set a range of [0,G_MAXINT-1] */
+ init_min = 0;
+ init_max = G_MAXINT-1;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ min=hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != init_min,
+ "hildon-controlbar: The returned min is %d and should be %d",
+ min, init_min);
+
+ max=hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != init_max,
+ "hildon-controlbar: The returned max is %d and should be %d",
+ max, init_max);
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid range values are set and get properly
+ * Cases considered:
+ * - Set a range of [10,100] on NULL object.
+ * - Set a range of [-1,G_MAXINT].
+ * - Set a range of [G_MININT,-1].
+ * - Set a range of [G_MAXINT,-1].
+ * - Set a range of [1,G_MININT].
+ */
+START_TEST (test_set_range_invalid)
+{
+ gint init_min;
+ gint init_max;
+ gint min;
+ gint max;
+
+ init_min = 10;
+ init_max = 100;
+ /* Test 1: Set range on a NULL object */
+ hildon_controlbar_set_range(NULL,init_min,init_max);
+
+ init_min = -1;
+ init_max = G_MAXINT;
+ /* Test 2: Set a range of [-1,G_MAXINT] */
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ min=hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != 0,
+ "hildon-controlbar: The returned min is %d and should be 0",
+ min);
+
+ max=hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != init_max,
+ "hildon-controlbar: The returned max is %d and should be %d",
+ max, init_max);
+
+ /* Test 3: Set a range of [G_MININT,-1] */
+ init_min = G_MININT;
+ init_max = -1;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ min=hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != 0,
+ "hildon-controlbar: The returned min is %d and should be 0",
+ min, 0);
+ max=hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != 0,
+ "hildon-controlbar: The returned max is %d and should be 0",
+ max);
+
+ /* Test 4: Set a range of [G_MAXINT,-1] */
+ init_min = G_MAXINT;
+ init_max = -1;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ max=hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != 0,
+ "hildon-controlbar: The returned max is %d and should be 0",
+ max);
+
+ min=hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != 0,
+ "hildon-controlbar: The returned min is %d and should be 0",
+ min);
+
+ /* Test 5: Set a range of [1,G_MININT] */
+ init_min = 1;
+ init_max = G_MININT;
+ hildon_controlbar_set_range(controlbar,init_min,init_max);
+
+ max=hildon_controlbar_get_max(controlbar);
+
+ fail_if (max != 0,
+ "hildon-controlbar: The returned max is %d and should be 0",
+ max);
+
+ min=hildon_controlbar_get_min(controlbar);
+
+ fail_if (min != 0,
+ "hildon-controlbar: The returned min is %d and should be 0",
+ min);
+}
+END_TEST
+
+/* ----- Test case for set_value -----*/
+/**
+ * Purpose: Check that regular values are set and get properly
+ * Cases considered:
+ * - Set a value of 500 in the range [0,1000].
+ */
+START_TEST (test_set_value_regular)
+{
+ gint init_value;
+ gint value;
+
+ init_value=500;
+ /* Must set a range different than [0,0], if not set you can not set a value*/
+ hildon_controlbar_set_range(controlbar,0,1000);
+
+ /* Test 1: Set a value of 500 in the range [0,1000].*/
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != init_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, init_value);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit values are set and get properly
+ * Cases considered:
+ * - Set a value of 0 in the range [0,1000].
+ * - Set a value of 1000 in the range [0,1000].
+ */
+START_TEST (test_set_value_limits)
+{
+ gint init_value;
+ gint value;
+
+ /* Must set a range diferent than [0,0], if not set you can not set a value*/
+ hildon_controlbar_set_range(controlbar,0,1000);
+
+ /* Test 1: Set a value of 0 in the range [0,1000] */
+ init_value=0;
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != init_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, init_value);
+
+ /* Test 2: Set a value of 1000 in the range [0,1000] */
+ init_value=1000;
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != init_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, init_value);
+}
+END_TEST
+
+
+/**
+ * Purpose: Check that invalid values are set and get properly
+ * Cases considered:
+ * - Set a value of 1 in a NULL controlbar.
+ * - Set a value of -1 in the range [2,1000].
+ * - Set a value of 1 in the range [2,1000].
+ * - Set a value of G_MININT in the range [2,1000].
+ * - Set a value of 1001 in the range [2,1000].
+ * - Set a value of G_MAXINT in the range [2,1000].
+ * - Set a value of G_MAXINT in the range [2,G_MAXINT].
+ */
+START_TEST (test_set_value_invalid)
+{
+ gint init_value;
+ gint initial_value=4;
+ gint value;
+ gint current_value;
+ gint min_value;
+ gint max_value;
+
+ min_value = 2;
+ max_value = 1000;
+ /* Must set a range diferent than [0,0], if not set you can not set a value*/
+ hildon_controlbar_set_range(controlbar,min_value,max_value);
+ hildon_controlbar_set_value(controlbar,initial_value);
+
+ /* Test 1: Set a value of 1 in a NULL controlbar. */
+ init_value=10;
+ hildon_controlbar_set_value(NULL,init_value);
+
+
+ /* Test 2: Set a value of -1 in the range [2,1000] */
+ init_value=-1;
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != initial_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, initial_value);
+
+ /* Test 3: Set a value of 1 in the range [2,1000] */
+ init_value=1;
+ hildon_controlbar_set_value(controlbar,min_value);
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != min_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, min_value);
+
+
+ /* Test 4: Set a value of G_MININT in the range [2,1000] */
+ init_value=G_MININT;
+ hildon_controlbar_set_value(controlbar,min_value+2);
+ current_value = hildon_controlbar_get_value(controlbar);
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != current_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, current_value);
+
+ /* Test 5: Set a value of 1001 in the range [2,1000] */
+ init_value=1001;
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != max_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, max_value);
+
+
+ /* Test 6: Set a value of G_MAXINT in the range [2,1000] */
+ init_value=G_MAXINT;
+
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != max_value,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, max_value);
+
+ /* Test 7: Set a value of G_MAXINT in the range [2,G_MAXINT] */
+ init_value=G_MAXINT;
+ hildon_controlbar_set_range(controlbar,2,G_MAXINT);
+ hildon_controlbar_set_value(controlbar,init_value);
+ value=hildon_controlbar_get_value(controlbar);
+ fail_if (value != G_MAXINT-1,
+ "hildon-controlbar: The returned value is %d and should be %d",
+ value, G_MAXINT-1);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_controlbar_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonControlbar");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_range");
+ TCase *tc2 = tcase_create("set_value");
+
+ /* Create test case for hildon_controlbar_set_range and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_controlbar, fx_teardown_default_controlbar);
+ tcase_add_test(tc1, test_set_range_regular);
+ tcase_add_test(tc1, test_set_range_limits);
+ tcase_add_test(tc1, test_set_range_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_controlbar_set_value and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_controlbar, fx_teardown_default_controlbar);
+ tcase_add_test(tc2, test_set_value_regular);
+ tcase_add_test(tc2, test_set_value_limits);
+ tcase_add_test(tc2, test_set_value_invalid);
+ suite_add_tcase (s, tc2);
+
+ return s;
+}
diff --git a/tests/check-hildon-date-editor.c b/tests/check-hildon-date-editor.c
new file mode 100644
index 0000000..22ef6f7
--- /dev/null
+++ b/tests/check-hildon-date-editor.c
@@ -0,0 +1,1038 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-date-editor.h"
+
+/* Taken from the values of the properties of HildonDateEditor */
+#define MAX_YEAR 2037
+#define MAX_MONTH 12
+#define MAX_DAY 31
+#define MIN_YEAR 1970
+#define MIN_MONTH 1
+#define MIN_DAY 1
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonDateEditor *date_editor = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_date_editor ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ showed_window = create_test_window ();
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+ /* Check that the date editor object has been created properly */
+ fail_if(!HILDON_IS_DATE_EDITOR(date_editor),
+ "hildon-date-editor: Creation failed.");
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (date_editor));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+}
+
+static void
+fx_teardown_default_date_editor ()
+{
+
+ /* Destroy the widget and the window */
+ gtk_widget_destroy (GTK_WIDGET (showed_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_date -----*/
+
+/**
+ * Purpose: test setting regular values for hildon_date_editor_set_date
+ * Cases considered:
+ * - Set and get the date 30/03/1981
+ */
+START_TEST (test_set_date_regular)
+{
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Try date 30/3/1981 */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+}
+END_TEST
+
+static void
+test_set_date_limits_check (guint year, guint month, guint day)
+{
+ guint ret_year, ret_month, ret_day;
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+}
+
+/**
+ * Purpose: test limit date values for hildon_date_editor_set_date
+ * Cases considered:
+ * - test a year value equal to the year limits (1970, 2037)
+ * - test a month value equal to the month limits (1, 12)
+ * - test a day value equal to the day limits for March (1, 31)
+ * - test a day value equal to the day limits June (1, 30)
+ * - test a day value equal to the day limit for a common February (28-2-1981)
+ * - test a day value equal to the day limit for a February of a leap year (29-2-1980)
+ */
+START_TEST (test_set_date_limits)
+{
+ guint year, month, day;
+
+ year = MIN_YEAR;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Test year limits */
+ test_set_date_limits_check (year, month, day);
+
+ year = MAX_YEAR;
+ test_set_date_limits_check (year, month, day);
+
+ /* Test 2: Test month limits */
+ year = 1981;
+ month = MIN_MONTH;
+ day = 30;
+ test_set_date_limits_check (year, month, day);
+
+ month = MAX_MONTH;
+ test_set_date_limits_check (year, month, day);
+
+ /* Test 3: Test day limits */
+ year = 1981;
+ month = 3;
+ day = 31;
+ test_set_date_limits_check (year, month, day);
+
+ /* Test 4: Test day limits */
+ year = 1981;
+ month = 6;
+ day = 30;
+ test_set_date_limits_check (year, month, day);
+
+ /* Test 5: Test february limits */
+ year = 1981;
+ month = 2;
+ day = 28;
+ test_set_date_limits_check (year, month, day);
+
+ /* Test 6: Test february limits for a leap year */
+ year = 1980;
+ month = 2;
+ day = 29;
+ test_set_date_limits_check (year, month, day);
+}
+END_TEST
+
+/**
+ * Purpose: test invalid parameter values for hildon_date_editor_set_date
+ * Cases considered:
+ * - test NULL widget
+ * - test passing GtkHBox instead a HildonDateEditor
+ * - test leap year
+ * - test negative values
+ * - test invalid month days
+ * - test a year value lower and higher than the year limits (1970, 2037)
+ * - test a month value lower and higher than the year limits (1, 12)
+ * - test a day value lower and higher than the year limits (1, 31)
+ */
+START_TEST (test_set_date_invalid)
+{
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+ GtkWidget *aux_object = NULL;
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Set init date */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ /* Test 1: Test NULL */
+ hildon_date_editor_set_date (NULL, year, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+
+ /* Test 2: Test another object */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ hildon_date_editor_set_date ((HildonDateEditor *) (aux_object), year, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+ gtk_widget_destroy (GTK_WIDGET(aux_object));
+
+ /* Test 3: Test leap year */
+ hildon_date_editor_set_date (date_editor, year, 2, 29);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+
+ /* Restore the original value */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ /* Test 4: Test negative values */
+ hildon_date_editor_set_date (date_editor, -year, -month, -day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+
+ /* Test 5: Test invalid month days */
+ hildon_date_editor_set_date (date_editor, year, 11, 31);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+ fail_if ((ret_year != year) || (ret_month != month) || (ret_day != day),
+ "hildon-date-editor: The returned date is %u/%u/%u and should be %u/%u/%u",
+ ret_year, ret_month, ret_day, year, month, day);
+
+ /* Test 6: Test year invalid values, the year value could be set
+ under/over the value of the property because the date is not
+ validated if the value was not set through the user interface */
+ hildon_date_editor_set_date (date_editor, MIN_YEAR - 1, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_year != (MIN_YEAR - 1),
+ "hildon-date-editor: The returned year is %u and should be %u",
+ ret_year, MIN_YEAR - 1);
+
+ hildon_date_editor_set_date (date_editor, MAX_YEAR + 1, month, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_year != MAX_YEAR + 1,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ ret_year, MAX_YEAR + 1);
+
+ /* Test 7: Test month invalid values, we do not have the same
+ problem with the years because both month 0 and 13 are not valid
+ for g_date */
+ hildon_date_editor_set_date (date_editor, year, MIN_MONTH - 1, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_month != month,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ ret_month, month);
+
+ hildon_date_editor_set_date (date_editor, year, MAX_MONTH + 1, day);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_month != month,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ ret_month, month);
+
+ /* Test 8: Test day invalid values */
+ hildon_date_editor_set_date (date_editor, year, month, MIN_DAY - 1);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_day != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ ret_day, day);
+
+ hildon_date_editor_set_date (date_editor, year, month, MAX_DAY + 1);
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ fail_if (ret_day != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ ret_day, day);
+}
+END_TEST
+
+/* ----- Test case for get_date -----*/
+
+/* We do not include tests for limit values because we think they're
+ tested enought with the set_data tests */
+
+/**
+ * Purpose: test getting regular values for hildon_date_editor_get_date
+ * Cases considered:
+ * - Set and get date 30/03/1981
+ */
+START_TEST (test_get_date_regular)
+{
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+ GValue value = { 0, };
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Test regular values */
+ hildon_date_editor_set_date (NULL, year, month, day);
+
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, &ret_day);
+
+ g_value_init (&value, G_TYPE_UINT);
+ g_object_get_property (G_OBJECT (date_editor), "year", &value);
+ fail_if (g_value_get_uint (&value) != ret_year,
+ "hildon-date-editor: get_date failed. The returned year is %u and should be %u",
+ g_value_get_uint (&value),
+ ret_year);
+
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ g_object_get_property (G_OBJECT (date_editor), "month", &value);
+ fail_if (g_value_get_uint (&value) != ret_month,
+ "hildon-date-editor: get_date failed. The returned month is %u and should be %u",
+ g_value_get_uint (&value),
+ ret_month);
+
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != ret_day,
+ "hildon-date-editor: get_date failed. The returned day is %u and should be %u",
+ g_value_get_uint (&value),
+ ret_day);
+}
+END_TEST
+
+/**
+ * Purpose: test getting regular values passing invalid arguments for
+ * hildon_date_editor_get_date
+ * Cases considered:
+ * - HildonDateEditor NULL
+ * - year is NULL
+ * - month is NULL
+ * - day is NULL
+ */
+START_TEST (test_get_date_invalid)
+{
+ guint year, month, day;
+ guint ret_year, ret_month, ret_day;
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ /* Check that does not fail */
+ hildon_date_editor_get_date (NULL, &ret_year, &ret_month, &ret_day);
+
+ /* Check NULL arguments */
+ hildon_date_editor_get_date (date_editor, NULL, &ret_month, &ret_day);
+ fail_if (hildon_date_editor_get_year (date_editor) != year,
+ "hildon-date-editor: get_date failed. The returned year is %u and should be %u",
+ ret_year, year);
+
+ hildon_date_editor_get_date (date_editor, &ret_year, NULL, &ret_day);
+ fail_if (hildon_date_editor_get_month (date_editor) != month,
+ "hildon-date-editor: get_date failed. The returned month is %u and should be %u",
+ ret_month, month);
+
+ hildon_date_editor_get_date (date_editor, &ret_year, &ret_month, NULL);
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: get_date failed. The returned day is %u and should be %u",
+ ret_day, day);
+}
+END_TEST
+
+/* ----- Test case for get_year -----*/
+
+/**
+ * Purpose: test getting regular values of the year for hildon_date_editor_get_year
+ * Cases considered:
+ * - get a year set with set_date 30/03/1981
+ * - get a year set with set_year 1980
+ * - get a year set with set_property 2004
+ */
+START_TEST (test_get_year_regular)
+{
+ guint year, month, day;
+ GValue value = {0, };
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Set year with set_date */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != year,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), year);
+
+ /* Test 2: set year with set_year */
+ year = 1980;
+ hildon_date_editor_set_year (date_editor, year);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != year,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), year);
+
+ /* Test 3: set year with set_property */
+ year = 2004;
+ g_value_init (&value, G_TYPE_UINT);
+ g_value_set_uint (&value, year);
+ g_object_set_property (G_OBJECT (date_editor), "year", &value);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != year,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), year);
+}
+END_TEST
+
+/**
+ * Purpose: test getting year when a value over the limits was set for
+ * hildon_date_editor_get_year
+ * Cases considered:
+ * - test year 2037
+ * - test year 1970
+ */
+START_TEST (test_get_year_limits)
+{
+ guint year;
+
+ year = 1981;
+
+ /* Set init year */
+ hildon_date_editor_set_year (date_editor, year);
+
+ /* Test 1: upper limit */
+ hildon_date_editor_set_year (date_editor, MAX_YEAR);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != MAX_YEAR,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), MAX_YEAR);
+
+ /* Test 2: lower limit */
+ hildon_date_editor_set_year (date_editor, MIN_YEAR);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != MIN_YEAR,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), MIN_YEAR);
+}
+END_TEST
+
+/**
+ * Purpose: test getting a year for invalid attributes for
+ * hildon_date_editor_get_year
+ * Cases considered:
+ * - HildonDateEditor is NULL
+ * - Pass a GtkHBox instead a HildonDateEditor
+ * - test year 2038
+ * - test year 1969
+ */
+START_TEST (test_get_year_invalid)
+{
+ guint ret_year;
+ GtkWidget *aux_object = NULL;
+
+ /* Test 1: Test NULL */
+ ret_year = hildon_date_editor_get_year (NULL);
+ fail_if (ret_year != 0,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ ret_year, 0);
+
+ /* Test 2: another object */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ ret_year = hildon_date_editor_get_year ((HildonDateEditor *) (aux_object));
+ fail_if (ret_year != 0,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ ret_year, 0);
+ gtk_widget_destroy (GTK_WIDGET(aux_object));
+
+ /* Test 3: upper limit, the test is OK but it shouldn't. The reason
+ is that the value of the date is not validated by Hildon since it
+ was not set using the UI */
+ hildon_date_editor_set_year (date_editor, MAX_YEAR + 1);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != MAX_YEAR + 1,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), MAX_YEAR + 1);
+
+ /* Test 4: lower limit, see the above comment */
+ hildon_date_editor_set_year (date_editor, MIN_YEAR - 1);
+
+ fail_if (hildon_date_editor_get_year (date_editor) != MIN_YEAR - 1,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ hildon_date_editor_get_year (date_editor), MIN_YEAR - 1);
+}
+END_TEST
+
+/* ----- Test case for set_year -----*/
+
+/**
+ * Purpose: test setting a regular value for a year for
+ * hildon_date_editor_set_year
+ * Cases considered:
+ * - Set year 1981
+ */
+START_TEST (test_set_year_regular)
+{
+ guint year;
+ guint ret_year;
+
+ year = 1981;
+
+ /* Test 1: Try year 1981 */
+ hildon_date_editor_set_year (date_editor, year);
+ ret_year = hildon_date_editor_get_year (date_editor);
+
+ fail_if (ret_year != year,
+ "hildon-date-editor: set_year failed. The returned year is %u and should be %u",
+ ret_year, year);
+}
+END_TEST
+
+/**
+ * Purpose: test setting values of the year over the limits for
+ * hildon_date_editor_set_year
+ * Cases considered:
+ * - Set year 2037
+ * - Set year 1970
+ */
+START_TEST (test_set_year_limits)
+{
+ guint year;
+ GValue value = { 0, };
+
+ year = 1981;
+
+ /* Set init date */
+ hildon_date_editor_set_year (date_editor, year);
+
+ /* Test 1: Test upper limit */
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_year (date_editor, MAX_YEAR);
+ g_object_get_property (G_OBJECT (date_editor), "year", &value);
+ fail_if (g_value_get_uint (&value) != MAX_YEAR,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ g_value_get_uint (&value), year);
+
+ /* Test 2: Test lower limit */
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_year (date_editor, MIN_YEAR);
+ g_object_get_property (G_OBJECT (date_editor), "year", &value);
+ fail_if (g_value_get_uint (&value) != MIN_YEAR,
+ "hildon-date-editor: The returned year is %u and should be %u",
+ g_value_get_uint (&value), MIN_YEAR);
+}
+END_TEST
+
+/* ----- Test case for get_month -----*/
+
+/**
+ * Purpose: test getting a year for regular values for
+ * hildon_date_editor_get_month
+ * Cases considered:
+ * - set month with set_date 30/03/1981
+ * - set month with set_month 1
+ * - set month with set_property 7
+ */
+START_TEST (test_get_month_regular)
+{
+ guint year, month, day;
+ GValue value = {0, };
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Set year with set_date */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ fail_if (hildon_date_editor_get_month (date_editor) != month,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ hildon_date_editor_get_month (date_editor), month);
+
+ /* Test 2: set month with set_month */
+ month = 1;
+ hildon_date_editor_set_month (date_editor, month);
+
+ fail_if (hildon_date_editor_get_month (date_editor) != month,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ hildon_date_editor_get_month (date_editor), month);
+
+ /* Test 3: set month with set_property */
+ month = 7;
+ g_value_init (&value, G_TYPE_UINT);
+ g_value_set_uint (&value, month);
+ g_object_set_property (G_OBJECT (date_editor), "month", &value);
+
+ fail_if (hildon_date_editor_get_month (date_editor) != month,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ hildon_date_editor_get_month (date_editor), month);
+}
+END_TEST
+
+/**
+ * Purpose: test getting values of the month over the limits for
+ * hildon_date_editor_get_month
+ * Cases considered:
+ * - Get month 12
+ * - Get month 1
+ */
+START_TEST (test_get_month_limits)
+{
+
+ /* Test 1: Upper limit */
+ hildon_date_editor_set_month (date_editor, MAX_MONTH);
+
+ fail_if (hildon_date_editor_get_month (date_editor) != MAX_MONTH,
+ "hildon-date-editor: get_month failed. The returned month is %u and should be %u",
+ hildon_date_editor_get_month (date_editor), MAX_MONTH);
+
+ /* Test 2: Lower limit */
+ hildon_date_editor_set_month (date_editor, MIN_MONTH);
+
+ fail_if (hildon_date_editor_get_month (date_editor) != MIN_MONTH,
+ "hildon-date-editor: get_month failed. The returned month is %u and should be %u",
+ hildon_date_editor_get_month (date_editor), MIN_MONTH);
+}
+END_TEST
+
+/**
+ * Purpose: test getting a month for invalid attributes for
+ * hildon_date_editor_get_month
+ * Cases considered:
+ * - HildonDateEditor is NULL
+ * - HildonDateEditor is really a GtkHBox
+ */
+START_TEST (test_get_month_invalid)
+{
+ guint ret_month;
+ GtkWidget *aux_object = NULL;
+
+ /* Test 1: Test NULL */
+ ret_month = hildon_date_editor_get_month (NULL);
+ fail_if (ret_month != 0,
+ "hildon-date-editor: get_month failed. The returned month is %u and should be %u",
+ ret_month, 0);
+
+ /* Test 2: another object */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ ret_month = hildon_date_editor_get_month ((HildonDateEditor *) (aux_object));
+ fail_if (ret_month != 0,
+ "hildon-date-editor: get_month failed. The returned month is %u and should be %u",
+ ret_month, 0);
+ gtk_widget_destroy (GTK_WIDGET(aux_object));
+}
+END_TEST
+
+/* ----- Test case for set_month -----*/
+
+/**
+ * Purpose: test setting regular values for month for
+ * hildon_date_editor_set_month
+ * Cases considered:
+ * - Set month 3
+ */
+START_TEST (test_set_month_regular)
+{
+ guint month;
+ guint ret_month;
+
+ month = 3;
+
+ /* Test 1: Try month March (3) */
+ hildon_date_editor_set_month (date_editor, month);
+ ret_month = hildon_date_editor_get_month (date_editor);
+
+ fail_if (ret_month != month,
+ "hildon-date-editor: set_month failed. The returned month is %u and should be %u",
+ ret_month, month);
+}
+END_TEST
+
+/**
+ * Purpose: test setting values for month over the limits for
+ * hildon_date_editor_get_month
+ * Cases considered:
+ * - Set month 12
+ * - Set month 1
+ */
+START_TEST (test_set_month_limits)
+{
+ GValue value = { 0, };
+
+ /* Test 1: Test upper limit */
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_month (date_editor, MAX_MONTH);
+ g_object_get_property (G_OBJECT (date_editor), "month", &value);
+ fail_if (g_value_get_uint (&value) != MAX_MONTH,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ g_value_get_uint (&value), MAX_MONTH);
+
+ /* Test 2: Test lower limit */
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_month (date_editor, MIN_MONTH);
+ g_object_get_property (G_OBJECT (date_editor), "month", &value);
+ fail_if (g_value_get_uint (&value) != MIN_MONTH,
+ "hildon-date-editor: The returned month is %u and should be %u",
+ g_value_get_uint (&value), MIN_MONTH);
+}
+END_TEST
+
+/* ----- Test case for get_day -----*/
+
+/**
+ * Purpose: test getting regular values for day for
+ * hildon_date_editor_get_day
+ * Cases considered:
+ * - Get a day set with set_date 30/03/1981
+ * - Get a day set with set_day 6
+ * - Get a day set with set_property 10
+ */
+START_TEST (test_get_day_regular)
+{
+ guint year, month, day;
+ GValue value = {0, };
+
+ year = 1981;
+ month = 3;
+ day = 30;
+
+ /* Test 1: Set day with set_date */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+ /* Test 2: set day with set_day */
+ day = 6;
+ hildon_date_editor_set_day (date_editor, day);
+
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+
+ /* Test 3: set day with set_property */
+ day = 10;
+ g_value_init (&value, G_TYPE_UINT);
+ g_value_set_uint (&value, day);
+ g_object_set_property (G_OBJECT (date_editor), "day", &value);
+
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+}
+END_TEST
+
+/**
+ * Purpose: test getting a day set over the limits for
+ * hildon_date_editor_get_day
+ * Cases considered:
+ * - Get day 31 for March
+ * - Get day 30 for June
+ * - Get day 29 for February for a leap year
+ * - Get day 28 for February for a common year
+ * - Get day 1
+ */
+START_TEST (test_get_day_limits)
+{
+ guint day, month, year;
+
+ year = 1981;
+ month = 3;
+ day = 31;
+
+ /* Test 1: 31 of February */
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: get_day failed. The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+ /* Test 2: 30 of February */
+ month = 6;
+ day = 30;
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: get_day failed. The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+ /* Test 3: 29 of February */
+ year = 1980;
+ month = 2;
+ day = 29;
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: get_day failed. The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+ /* Test 3: 28 of February */
+ year = 1981;
+ month = 2;
+ day = 28;
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ fail_if (hildon_date_editor_get_day (date_editor) != day,
+ "hildon-date-editor: get_day failed. The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), day);
+
+ /* Test 5: day 1 */
+ hildon_date_editor_set_day (date_editor, 1);
+
+ fail_if (hildon_date_editor_get_day (date_editor) != 1,
+ "hildon-date-editor: get_day failed. The returned day is %u and should be %u",
+ hildon_date_editor_get_day (date_editor), 1);
+}
+END_TEST
+
+/**
+ * Purpose: test getting a day with invalid attributes for
+ * hildon_date_editor_get_day
+ * Cases considered:
+ * - HildonDateEditor is NULL
+ * - HildonDateEditor is really a GtkHBox
+ */
+START_TEST (test_get_day_invalid)
+{
+ guint ret_year;
+ GtkWidget *aux_object = NULL;
+
+ /* Test 1: Test NULL */
+ ret_year = hildon_date_editor_get_year (NULL);
+ fail_if (ret_year != 0,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ ret_year, 0);
+
+ /* Test 2: another object */
+ aux_object = gtk_hbox_new (TRUE, 0);
+ ret_year = hildon_date_editor_get_year ((HildonDateEditor *) aux_object);
+ fail_if (ret_year != 0,
+ "hildon-date-editor: get_year failed. The returned year is %u and should be %u",
+ ret_year, 0);
+ gtk_widget_destroy (GTK_WIDGET(aux_object));
+}
+END_TEST
+
+/* ----- Test case for set_day -----*/
+
+/**
+ * Purpose: test setting a regular value for day for
+ * hildon_date_editor_get_day
+ * Cases considered:
+ * - Set day 30
+ */
+START_TEST (test_set_day_regular)
+{
+ guint day;
+ guint ret_day;
+
+ day = 30;
+
+ /* Test 1: Try day 30 */
+ hildon_date_editor_set_day (date_editor, day);
+ ret_day = hildon_date_editor_get_day (date_editor);
+
+ fail_if (ret_day != day,
+ "hildon-date-editor: set_day failed. The returned day is %u and should be %u",
+ ret_day, day);
+}
+END_TEST
+
+/**
+ * Purpose: test seeting a day over the limits for
+ * hildon_date_editor_get_day
+ * Cases considered:
+ * - Set day 31
+ * - Set day 30
+ * - Set day 29
+ * - Set day 28
+ * - Set day 1
+ */
+START_TEST (test_set_day_limits)
+{
+ guint day, year, month;
+ GValue value = { 0, };
+
+ year = 1981;
+ month = 3;
+ day = 31;
+
+ /* Set init date */
+ hildon_date_editor_set_date (date_editor, year, month, MIN_DAY);
+
+ /* Test 1: Test 31/03 */
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_day (date_editor, day);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ g_value_get_uint (&value), day);
+
+ /* Test 2: Test 30/06 */
+ month = 6;
+ day = 30;
+ hildon_date_editor_set_date (date_editor, year, month, 1);
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_day (date_editor, day);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ g_value_get_uint (&value), day);
+
+ /* Test 3: Test 29/02/1980 */
+ year = 1980;
+ month = 2;
+ day = 29;
+ hildon_date_editor_set_date (date_editor, year, month, 1);
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_day (date_editor, day);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ g_value_get_uint (&value), day);
+
+ /* Test 4: Test 28/02/1981 */
+ year = 1981;
+ month = 2;
+ day = 28;
+ hildon_date_editor_set_date (date_editor, year, month, 1);
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_day (date_editor, day);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ g_value_get_uint (&value), day);
+
+ /* Test 5: Test 1/02/1980 */
+ year = 1980;
+ month = 2;
+ day = 1;
+ hildon_date_editor_set_date (date_editor, year, month, 10);
+ g_value_unset (&value);
+ g_value_init (&value, G_TYPE_UINT);
+ hildon_date_editor_set_day (date_editor, day);
+ g_object_get_property (G_OBJECT (date_editor), "day", &value);
+ fail_if (g_value_get_uint (&value) != day,
+ "hildon-date-editor: The returned day is %u and should be %u",
+ g_value_get_uint (&value), day);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_date_editor_suite(void)
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonDateEditor");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_date");
+ TCase *tc2 = tcase_create("get_date");
+ TCase *tc3 = tcase_create("get_year");
+ TCase *tc4 = tcase_create("set_year");
+ TCase *tc5 = tcase_create("get_month");
+ TCase *tc6 = tcase_create("set_month");
+ TCase *tc7 = tcase_create("get_day");
+ TCase *tc8 = tcase_create("set_day");
+
+ /* Create test case for set_date and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc1, test_set_date_regular);
+ tcase_add_test(tc1, test_set_date_limits);
+ tcase_add_test(tc1, test_set_date_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for get_date and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc2, test_get_date_regular);
+ tcase_add_test(tc2, test_get_date_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for get_year and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc3, test_get_year_regular);
+ tcase_add_test(tc3, test_get_year_limits);
+ tcase_add_test(tc3, test_get_year_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Create test case for set_year and add it to the suite */
+ tcase_add_checked_fixture(tc4, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc4, test_set_year_regular);
+ tcase_add_test(tc4, test_set_year_limits);
+ suite_add_tcase (s, tc4);
+
+ /* Create test case for get_month and add it to the suite */
+ tcase_add_checked_fixture(tc5, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc5, test_get_month_regular);
+ tcase_add_test(tc5, test_get_month_limits);
+ tcase_add_test(tc5, test_get_month_invalid);
+ suite_add_tcase (s, tc5);
+
+ /* Create test case for set_month and add it to the suite */
+ tcase_add_checked_fixture(tc6, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc6, test_set_month_regular);
+ tcase_add_test(tc6, test_set_month_limits);
+ suite_add_tcase (s, tc6);
+
+ /* Create test case for get_day and add it to the suite */
+ tcase_add_checked_fixture(tc7, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc7, test_get_day_regular);
+ tcase_add_test(tc7, test_get_day_limits);
+ tcase_add_test(tc7, test_get_day_invalid);
+ suite_add_tcase (s, tc7);
+
+ /* Create test case for set_day and add it to the suite */
+ tcase_add_checked_fixture(tc8, fx_setup_default_date_editor, fx_teardown_default_date_editor);
+ tcase_add_test(tc8, test_set_day_regular);
+ tcase_add_test(tc8, test_set_day_limits);
+ suite_add_tcase (s, tc8);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-defines.c b/tests/check-hildon-defines.c
new file mode 100644
index 0000000..9de7474
--- /dev/null
+++ b/tests/check-hildon-defines.c
@@ -0,0 +1,188 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtklabel.h>
+#include "test_suites.h"
+#include "hildon-defines.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static void
+fx_setup_default_defines ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+}
+
+static void
+fx_teardown_default_defines ()
+{
+}
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for gtk_widget_set_logical_font -----*/
+
+/**
+ * Purpose: test setting a new logical font to a GtkWidget
+ * Cases considered:
+ * - Set the font name "TimesNewRoman"
+ */
+START_TEST (test_gtk_widget_set_logical_font_regular)
+{
+ GtkWidget *label = NULL;
+ gulong signum = G_MAXULONG;
+
+ label = gtk_label_new ("test label");
+
+ signum = hildon_gtk_widget_set_logical_font (label, "TimesNewRoman");
+ gtk_widget_destroy (GTK_WIDGET (label));
+
+ fail_if (signum <= 0,
+ "hildon-defines: the returned signal id is %ul and should be > 0",
+ signum);
+}
+END_TEST
+
+/**
+ * Purpose: test setting a logical font with invalid parameters
+ * Cases considered:
+ * - Set the font name "TimesNewRoman" to a NULL Widget
+ * - Set a NULL font name to a valid Widget
+ */
+START_TEST (test_gtk_widget_set_logical_font_invalid)
+{
+ GtkWidget *label = NULL;
+ gulong signum = G_MAXULONG;
+
+ /* Test 1 */
+ signum = hildon_gtk_widget_set_logical_font (NULL, "TimesNewRoman");
+ fail_if (signum != 0,
+ "hildon-defines: the returned signal id is %ul and should be 0",
+ signum);
+
+ /* Test 2 */
+ label = gtk_label_new ("test label");
+
+ signum = hildon_gtk_widget_set_logical_font (label, NULL);
+ gtk_widget_destroy (GTK_WIDGET (label));
+
+ fail_if (signum != 0,
+ "hildon-defines: the returned signal id is %ul and should be 0",
+ signum);
+}
+END_TEST
+
+
+/* ----- Test case for gtk_widget_set_logical_color -----*/
+
+/**
+ * Purpose: test setting a new logical color to a GtkWidget
+ * Cases considered:
+ * - Set the logical color "Blue"
+ */
+START_TEST (test_gtk_widget_set_logical_color_regular)
+{
+ GtkWidget *label = NULL;
+ gulong signum = G_MAXULONG;
+
+ label = gtk_label_new ("test label");
+
+ signum = hildon_gtk_widget_set_logical_color (label,
+ GTK_RC_BG,
+ GTK_STATE_NORMAL,
+ "Blue");
+ gtk_widget_destroy (GTK_WIDGET (label));
+
+ fail_if (signum <= 0,
+ "hildon-defines: the returned signal id is %ul and should be > 0",
+ signum);
+}
+END_TEST
+
+/**
+ * Purpose: test setting a logical color with invalid parameters
+ * Cases considered:
+ * - Set the color name "Blue" to a NULL Widget
+ * - Set a NULL color name to a valid Widget
+ */
+START_TEST (test_gtk_widget_set_logical_color_invalid)
+{
+ GtkWidget *label = NULL;
+ gulong signum = G_MAXULONG;
+
+ /* Test 1 */
+ signum = hildon_gtk_widget_set_logical_color (NULL,
+ GTK_RC_BG,
+ GTK_STATE_NORMAL,
+ "Blue");
+ fail_if (signum != 0,
+ "hildon-defines: the returned signal id is %ul and should be 0",
+ signum);
+
+ /* Create the widget */
+ label = gtk_label_new ("test label");
+
+ /* Test 2 */
+ signum = hildon_gtk_widget_set_logical_color (label,
+ GTK_RC_BG,
+ GTK_STATE_NORMAL,
+ NULL);
+ gtk_widget_destroy (GTK_WIDGET (label));
+
+ fail_if (signum != 0,
+ "hildon-defines: the returned signal id is %ul and should be 0",
+ signum);
+}
+END_TEST
+
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_defines_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonDefines");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("gtk_widget_set_logical_font");
+ TCase *tc2 = tcase_create("gtk_widget_set_logical_color");
+
+ /* Create test case for set_logical_font and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_defines, fx_teardown_default_defines);
+ tcase_add_test(tc1, test_gtk_widget_set_logical_font_regular);
+ tcase_add_test(tc1, test_gtk_widget_set_logical_font_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for set_logical_color and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_defines, fx_teardown_default_defines);
+ tcase_add_test(tc2, test_gtk_widget_set_logical_color_regular);
+ tcase_add_test(tc2, test_gtk_widget_set_logical_color_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-dialoghelp.c b/tests/check-hildon-dialoghelp.c
new file mode 100644
index 0000000..92a3ab4
--- /dev/null
+++ b/tests/check-hildon-dialoghelp.c
@@ -0,0 +1,171 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtksignal.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include <gdk/gdkx.h>
+#include "hildon-dialoghelp.h"
+
+/* -------------------- Fixtures -------------------- */
+static GtkWidget * dialoghelp = NULL;
+
+static void
+change_help_status (GtkDialog *dialog, gpointer func_data)
+{
+ gboolean * data = func_data;
+ *data = TRUE;
+}
+
+static void
+fx_setup_default_dialoghelp ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ dialoghelp = gtk_dialog_new();
+ /* Check that the dialog help object has been created properly */
+ fail_if(!GTK_IS_DIALOG (dialoghelp), "hildon-dialoghelp: Creation failed");
+
+ /* Displays the widget */
+ show_all_test_window (dialoghelp);
+
+}
+
+static void
+fx_teardown_default_dialoghelp ()
+{
+ gtk_widget_destroy(GTK_WIDGET(dialoghelp));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for enable_dialoghelp -----*/
+/**
+ * Purpose: test gtk_dialog_help_enable/gtk_dialog_help_disable connecting help signal
+ * Cases considered:
+ * - Test if gtk_dialog_help_enable actually enables help dialog status
+ * - Test if gtk_dialog_help_enable actually adds help atom to atoms' list
+ * - Test if gtk_dialog_help_disable actually removes help atom to atoms' list
+ */
+START_TEST (test_enable_dialoghelp_regular)
+{
+ gboolean help_enabled = FALSE;
+ GdkWindow *window=NULL;
+ GdkDisplay *display;
+ Atom *list;
+ Atom helpatom;
+ int amount = 0;
+ int i = 0;
+ gboolean helpAtom = FALSE;
+
+ gtk_dialog_help_enable(GTK_DIALOG(dialoghelp));
+ gtk_signal_connect(GTK_OBJECT(dialoghelp),"help",GTK_SIGNAL_FUNC(change_help_status),&help_enabled);
+ gtk_signal_emit_by_name(GTK_OBJECT(dialoghelp),"help");
+
+ /* Test 1: Test if gtk_dialog_help_enable actually enables help dialog status */
+ fail_if(help_enabled!=TRUE,"hildon-dialoghelp: Enable help failed");
+
+ /* In order to obtain dialog->window. */
+ gtk_widget_realize(GTK_WIDGET(dialoghelp));
+ window = GTK_WIDGET(dialoghelp)->window;
+ display = gdk_drawable_get_display (window);
+
+ XGetWMProtocols(GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
+ &list, &amount);
+
+ helpatom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_CONTEXT_HELP");
+
+ /* search if the help_atom is in the atoms' list */
+ for (i=0; i<amount; i++)
+ {
+ if (list[i] == helpatom)
+ {
+ helpAtom = TRUE;
+ break;
+ }
+ }
+ XFree (list);
+
+ /* Test 2: Test if gtk_dialog_help_enable actually adds help atom to atoms' list */
+ fail_if(helpAtom!=TRUE,"hildon-dialoghelp: Help atom is not in the atoms' list");
+
+
+ helpAtom = FALSE;
+ gtk_dialog_help_disable(GTK_DIALOG(dialoghelp));
+ XGetWMProtocols(GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
+ &list, &amount);
+ helpatom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_CONTEXT_HELP");
+
+ /* search if the help_atom is in the atoms' list */
+ for (i=0; i<amount; i++)
+ {
+ if (list[i] == helpatom)
+ {
+ helpAtom = TRUE;
+ break;
+ }
+ }
+ XFree (list);
+ /* Test 3: Test if gtk_dialog_help_disable actually removes help atom to atoms' list */
+ fail_if(helpAtom==TRUE,"hildon-dialoghelp: Help atom is in the atoms' list");
+}
+END_TEST
+
+/**
+ * Purpose: test gtk_dialog_help_enable connecting help signal
+ * Cases considered:
+ * - Enable help dialog on NULL object.
+ * - Disable help dialog on NULL object.
+ */
+START_TEST (test_enable_dialoghelp_invalid)
+{
+ gtk_dialog_help_enable(NULL);
+ gtk_dialog_help_disable(NULL);
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_dialoghelp_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonDialogHelp");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("dialog_help_enable");
+
+ /* Create test case for gtk_dialog_help_enable and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_dialoghelp, fx_teardown_default_dialoghelp);
+ tcase_add_test(tc1, test_enable_dialoghelp_regular);
+ tcase_add_test(tc1, test_enable_dialoghelp_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-find-toolbar.c b/tests/check-hildon-find-toolbar.c
new file mode 100644
index 0000000..81ed9bb
--- /dev/null
+++ b/tests/check-hildon-find-toolbar.c
@@ -0,0 +1,186 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include <string.h>
+
+#include "hildon-find-toolbar.h"
+#include "hildon-window.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonFindToolbar *find_toolbar = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_find_toolbar ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ /* Creates a find toolbar */
+ find_toolbar = HILDON_FIND_TOOLBAR(hildon_find_toolbar_new(TEST_STRING));
+ /* Check find toolbar object has been created properly */
+ fail_if(!HILDON_IS_FIND_TOOLBAR(find_toolbar),
+ "hildon-find-toolbar: Creation failed.");
+
+ showed_window = create_test_window ();
+
+ hildon_window_add_toolbar(HILDON_WINDOW(showed_window), GTK_TOOLBAR(find_toolbar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+}
+
+static void
+fx_setup_model_find_toolbar ()
+{
+ int argc = 0;
+ GtkListStore *model;
+ GtkTreeIter iter;
+ GValue value = {0,};
+
+ gtk_init(&argc, NULL);
+
+ /* Creates a find toolbar with a model */
+ model = gtk_list_store_new(1, G_TYPE_STRING);
+ gtk_list_store_append(model, &iter);
+ gtk_list_store_set (model, &iter, 0, "hildon", -1);
+ gtk_list_store_append(model, &iter);
+ gtk_list_store_set (model, &iter, 0, "nokia", -1);
+ find_toolbar = HILDON_FIND_TOOLBAR(hildon_find_toolbar_new_with_model(NULL, model, 0));
+ /* Check find toolbar object has been created properly */
+ fail_if(!HILDON_IS_FIND_TOOLBAR(find_toolbar),
+ "hildon-find-toolbar: Creation failed.");
+
+ /* Check model is set */
+ g_value_init (&value, GTK_TYPE_LIST_STORE);
+ g_object_get_property(G_OBJECT(find_toolbar), "list", &value);
+
+ fail_if (model != g_value_get_object(&value),
+ "hildon-find-toolbar: Creation with model failed, model retrieved is different from model set in new_with_model");
+
+ showed_window = create_test_window ();
+
+ hildon_window_add_toolbar(HILDON_WINDOW(showed_window), GTK_TOOLBAR(find_toolbar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+}
+
+static void
+fx_teardown_find_toolbar()
+{
+
+ gtk_widget_destroy(GTK_WIDGET(showed_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get_property "label" -----*/
+
+/**
+ * Purpose: Check that property "label" is set and get properly.
+ * Cases considered:
+ * - Set and get with a regular string
+ * - Set and get with value ""
+ */
+START_TEST (test_set_get_property_label_regular)
+{
+ GValue value_set = {0,};
+ GValue value_get = {0,};
+
+ g_value_init(&value_set,G_TYPE_STRING);
+ g_value_init(&value_get,G_TYPE_STRING);
+
+ /* Test1: set/get of a regular string */
+ g_value_set_string(&value_set, TEST_STRING);
+ g_object_set_property(G_OBJECT(find_toolbar), "label", &value_set);
+ g_object_get_property(G_OBJECT(find_toolbar), "label", &value_get);
+ fail_if (strcmp(g_value_get_string(&value_get), g_value_get_string(&value_set)) != 0,
+ "hildon-find-toolbar: Property \"label\" was set to value \"%s\", but get_property retrieved value \"%s\"",
+ g_value_get_string(&value_set), g_value_get_string(&value_get));
+
+ /* Test2: set/get of label "" */
+ g_value_set_string(&value_set, "");
+ g_object_set_property(G_OBJECT(find_toolbar), "label", &value_set);
+ g_object_get_property(G_OBJECT(find_toolbar), "label", &value_get);
+ fail_if (strcmp(g_value_get_string(&value_get), g_value_get_string(&value_set)) != 0,
+ "hildon-find-toolbar: Property \"label\" was set to value \"%s\", but get_property retrieved value \"%s\"",
+ g_value_get_string(&value_set), g_value_get_string(&value_get));
+}
+END_TEST
+
+/**
+ * Purpose: Check handling of invalid values for property "label"
+ * Cases considered:
+ * - Set and get with NULL value
+ */
+START_TEST (test_set_get_property_label_invalid)
+{
+ GValue value_set = {0,};
+ GValue value_get = {0,};
+
+ g_value_init(&value_set,G_TYPE_STRING);
+
+ /* Test1: set/get of NULL label */
+ g_value_set_string(&value_set, NULL);
+ g_object_set_property(G_OBJECT(find_toolbar), "label", &value_set);
+ g_object_get_property(G_OBJECT(find_toolbar), "label", &value_get);
+ fail_if (g_value_get_string(&value_get) != NULL,
+ "hildon-find-toolbar: Property \"label\" was set to value NULL, but get_property retrieved value \"%s\"",
+ g_value_get_string(&value_get));
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_find_toolbar_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonFindToolbar");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_property_label");
+ TCase *tc2 = tcase_create("model_set_get_property_label");
+
+ /* Create unit tests for set/get of property "label" and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_find_toolbar, fx_teardown_find_toolbar);
+ tcase_add_test(tc1, test_set_get_property_label_regular);
+ tcase_add_test(tc1, test_set_get_property_label_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create unit tests for set/get of property "label" and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_model_find_toolbar, fx_teardown_find_toolbar);
+ tcase_add_test(tc2, test_set_get_property_label_regular);
+ tcase_add_test(tc2, test_set_get_property_label_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-font-selection-dialog.c b/tests/check-hildon-font-selection-dialog.c
new file mode 100644
index 0000000..2532f4d
--- /dev/null
+++ b/tests/check-hildon-font-selection-dialog.c
@@ -0,0 +1,476 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <glib/gprintf.h>
+#include <string.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-font-selection-dialog.h"
+
+#define PREVIEW_TEXT TEST_STRING
+#define DEFAULT_FONT_FAMILY "Nokia Sans"
+
+static const guint16 N_FONT_SIZES = 7;
+static const guint16 FONT_SIZES[] =
+ {
+ 6, 8, 10, 12, 16, 24, 32
+ };
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonFontSelectionDialog *font_selection_dialog = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_font_selection_dialog ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ showed_window = create_test_window();
+
+
+ font_selection_dialog = HILDON_FONT_SELECTION_DIALOG(hildon_font_selection_dialog_new(GTK_WINDOW(showed_window), "Font setup"));
+
+ /* Check font selection dialog object has been created properly */
+ fail_if(!HILDON_IS_FONT_SELECTION_DIALOG(font_selection_dialog),
+ "hildon-font-selection-dialog: Creation failed.");
+
+ show_test_window(GTK_WIDGET(showed_window));
+
+ show_test_window(GTK_WIDGET(font_selection_dialog));
+
+}
+
+static void
+fx_teardown_default_font_selection_dialog ()
+{
+
+ gtk_widget_destroy(GTK_WIDGET(font_selection_dialog));
+
+ gtk_widget_destroy(GTK_WIDGET(showed_window));
+
+}
+
+/* -------------------- Helpers -------------------- */
+
+static int
+helper_cmp_families(const void *a, const void *b)
+{
+ const char *a_name =
+ pango_font_family_get_name(*(PangoFontFamily **) a);
+ const char *b_name =
+ pango_font_family_get_name(*(PangoFontFamily **) b);
+
+ return g_utf8_collate(a_name, b_name);
+}
+
+static void
+helper_get_available_fonts(HildonFontSelectionDialog *fsd,
+ PangoFontFamily ***families,
+ gint *n_families)
+
+{
+ pango_context_list_families(gtk_widget_get_pango_context(GTK_WIDGET(fsd)),
+ families,
+ n_families);
+
+ qsort(*families, *n_families, sizeof(PangoFontFamily *), helper_cmp_families);
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get_preview_text ----- */
+
+/**
+ * Purpose: Check set and get of a valid preview text
+ * Cases considered:
+ * - Set and get of a preview text
+ */
+START_TEST (test_set_get_preview_text_regular)
+{
+ gchar *ret_preview_text;
+
+ /* Test1: set and get a preview text */
+ hildon_font_selection_dialog_set_preview_text(font_selection_dialog, PREVIEW_TEXT);
+ ret_preview_text = hildon_font_selection_dialog_get_preview_text(font_selection_dialog);
+ fail_if(strcmp(PREVIEW_TEXT, ret_preview_text) != 0,
+ "hildon-font-selection-dialog: Called set_previex_text with \"%s\", but get_preview_text returned \"%s\"",
+ PREVIEW_TEXT, ret_preview_text);
+ g_free(ret_preview_text);
+}
+END_TEST
+
+/**
+ * Purpose: Check handling of invalid values
+ * Cases considered:
+ * - Set empty preview text
+ * - Set a NULL preview text
+ * - Set with NULL object
+ * - Set with NULL object
+ */
+START_TEST (test_set_get_preview_text_invalid)
+{
+ gchar *ret_preview_text;
+
+ /* Test1: Set a NULL preview text */
+ hildon_font_selection_dialog_set_preview_text(font_selection_dialog, NULL);
+ ret_preview_text = hildon_font_selection_dialog_get_preview_text(font_selection_dialog);
+ fail_if(ret_preview_text == NULL,
+ "hildon-font-selection-dialog: Call to set_preview_text with a NULL text is allowed");
+ g_free(ret_preview_text);
+
+ /* Test2: Set an empty preview text */
+ hildon_font_selection_dialog_set_preview_text(font_selection_dialog, "");
+ ret_preview_text = hildon_font_selection_dialog_get_preview_text(font_selection_dialog);
+ fail_if(strcmp("", ret_preview_text) != 0,
+ "hildon-font-selection-dialog: Call to set_preview_text with an empty text is allowed");
+ g_free(ret_preview_text);
+
+ /* Test3: Set with NULL object */
+ hildon_font_selection_dialog_set_preview_text(NULL, PREVIEW_TEXT);
+
+ /* Test4: Get with NULL object */
+ hildon_font_selection_dialog_get_preview_text(NULL);
+}
+END_TEST
+
+/* ----- Test case for set/get property "family" ----- */
+
+/**
+ * Purpose: Check handling of regular values
+ * Cases considered:
+ * - Set and get a font from the middle of the available fonts list
+ */
+START_TEST (test_set_get_property_family_regular)
+{
+ PangoFontFamily **families;
+ gint n_families;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ helper_get_available_fonts(font_selection_dialog, &families, &n_families);
+ fail_if (n_families <= 0, "hildon-font-selection-dialog: No available fonts");
+
+ /* Test1: set and get a font family */
+ g_value_init(&value, G_TYPE_STRING);
+ g_value_init(&ret_value, G_TYPE_STRING);
+ g_value_set_string(&value, pango_font_family_get_name(families[n_families/2]));
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &ret_value);
+ fail_if(strcmp(g_value_get_string(&value), g_value_get_string(&ret_value)) != 0,
+ "hildon-font-selection-dialog: set property \"family\" to value \"%s\", but get property returned value \"%s\"",
+ g_value_get_string(&value), g_value_get_string(&ret_value));
+}
+END_TEST
+
+/**
+ * Purpose: Check handling of limit values
+ * Cases considered:
+ * - Set and get first font of the available fonts list
+ * - Set and get last font of the available fonts list
+ */
+START_TEST (test_set_get_property_family_limits)
+{
+ PangoFontFamily **families;
+ gint n_families;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ helper_get_available_fonts(font_selection_dialog, &families, &n_families);
+ fail_if (n_families <= 0, "hildon-font-selection-dialog: No available fonts");
+
+ /* Test1: Test first font in the list */
+ g_value_init(&value, G_TYPE_STRING);
+ g_value_init(&ret_value, G_TYPE_STRING);
+ g_value_set_string(&value, pango_font_family_get_name(families[0]));
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &ret_value);
+ fail_if(strcmp(g_value_get_string(&value), g_value_get_string(&ret_value)) != 0,
+ "hildon-font-selection-dialog: set property \"family\" to value \"%s\", but get property returned value \"%s\"",
+ g_value_get_string(&value), g_value_get_string(&ret_value));
+
+ /* Test2: Test last font in the list */
+ g_value_set_string(&value, pango_font_family_get_name(families[n_families-1]));
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &ret_value);
+ fail_if(strcmp(g_value_get_string(&value), g_value_get_string(&ret_value)) != 0,
+ "hildon-font-selection-dialog: set property \"family\" to value \"%s\", but get property returned value \"%s\"",
+ g_value_get_string(&value), g_value_get_string(&ret_value));
+}
+END_TEST
+
+/**
+ * Purpose: Check handling of invalid values
+ * Cases considered:
+ * - Set a non existing font
+ * - Set a NULL font
+ */
+START_TEST (test_set_get_property_family_invalid)
+{
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ /* Test1: Set non existing font */
+ g_value_init(&value, G_TYPE_STRING);
+ g_value_init(&ret_value, G_TYPE_STRING);
+ g_value_set_string(&value, "-- invalid font name --");
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &ret_value);
+ fail_if(strcmp(DEFAULT_FONT_FAMILY, g_value_get_string(&ret_value)) != 0,
+ "hildon-font-selection-dialog: set property \"family\" to invalid font name \"%s\", but get property returned value \"%s\" instead of \"%s\"",
+ g_value_get_string(&value), g_value_get_string(&ret_value), DEFAULT_FONT_FAMILY);
+
+ /* Test2: Set NULL font */
+ g_value_reset (&ret_value);
+ g_value_reset (&value);
+ g_value_set_string(&value, NULL);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &ret_value);
+ fail_if(strcmp(DEFAULT_FONT_FAMILY, g_value_get_string(&ret_value)) != 0,
+ "hildon-font-selection-dialog: set property \"family\" to NULL, but get property returned value \"%s\" instead of \"%s\"",
+ g_value_get_string(&ret_value), DEFAULT_FONT_FAMILY);
+}
+END_TEST
+
+/* ----- Test case for set/get property "family-set" ----- */
+
+/**
+ * Purpose: Check set and get of valid values
+ * Cases considered:
+ * - Get returns FALSE when no font is selected.
+ * - Get returns TRUE when a font has been selected.
+ * - Set and get of value TRUE once a font has been selected
+ * - Set and get of value FALSE
+ */
+START_TEST (test_set_get_property_family_set_regular)
+{
+ PangoFontFamily **families;
+ gint n_families;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+ GValue family_value = {0,};
+
+ helper_get_available_fonts(font_selection_dialog, &families, &n_families);
+ fail_if (n_families <= 0, "hildon-font-selection-dialog: No available fonts");
+
+ g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_init(&ret_value, G_TYPE_BOOLEAN);
+ g_value_init(&family_value, G_TYPE_STRING);
+
+ /* Test1: Check get value returns FALSE when no font is selected */
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family-set", &ret_value);
+ if (g_value_get_boolean(&ret_value) == FALSE)
+ {
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &family_value);
+ fail_if(strcmp(DEFAULT_FONT_FAMILY, g_value_get_string(&family_value)) != 0,
+ "hildon-font-selection-dialog: After dialog creation, get value of property \"family-set\" returns FALSE, but get value of property \"family\" is \"%s\" instead of \"%s\"",
+ g_value_get_string(&family_value), DEFAULT_FONT_FAMILY);
+ }
+
+ /* Test2: Check get value returns TRUE when a font has been selected */
+ g_value_set_string(&family_value, pango_font_family_get_name(families[0]));
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family", &family_value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family-set", &ret_value);
+ fail_if(g_value_get_boolean(&ret_value) != TRUE,
+ "hildon-font-selection-dialog: Set a valid font for property \"family\", but get property \"family-set\" returned FALSE");
+
+ /* Test3: Check set value to TRUE */
+ g_value_set_boolean(&value, TRUE);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family-set", &ret_value);
+ fail_if(g_value_get_boolean(&ret_value) != TRUE,
+ "hildon-font-selection-dialog: Set property \"family-set\" to TRUE once a valid font has been selected, but get_property returned FALSE");
+
+ /* Test4: Check set value to FALSE */
+ g_value_set_boolean(&value, FALSE);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "family-set", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family-set", &ret_value);
+ fail_if(g_value_get_boolean(&value) != g_value_get_boolean(&ret_value),
+ "hildon-font-selection-dialog: Set property \"family-set\" to FALSE, but get_property returned TRUE");
+ g_object_get_property(G_OBJECT(font_selection_dialog), "family", &family_value);
+ fail_if(strcmp(DEFAULT_FONT_FAMILY, g_value_get_string(&family_value)) != 0,
+ "hildon-font-selection-dialog: Set property \"family-set\" to FALSE, but get of propery \"family\" returns \"%s\" instead of \"%s\"",
+ g_value_get_string(&family_value), DEFAULT_FONT_FAMILY);
+}
+END_TEST
+
+/* ----- Test case for set/get property "size" ----- */
+
+/**
+ * Purpose: Check set and get of valid values
+ * Cases considered:
+ * - Set a font size from the middle of the available sizes list
+ */
+START_TEST (test_set_get_property_size_regular)
+{
+ gint font_size;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ g_value_init(&value, G_TYPE_INT);
+ g_value_init(&ret_value, G_TYPE_INT);
+
+ /* Test1: set a valid font size */
+ font_size = FONT_SIZES[N_FONT_SIZES/2];
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != font_size,
+ "hildon-font-selection-dialog: Set property \"size\" to %d, but get property returned \"%d\"",
+ font_size, g_value_get_int(&ret_value));
+}
+END_TEST
+
+/**
+ * Purpose: Check set and get of limit values
+ * Cases considered:
+ * - Set first font size in the available sizes list
+ * - Set last font size in the available sizes list
+ */
+START_TEST (test_set_get_property_size_limits)
+{
+ gint font_size;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ g_value_init(&value, G_TYPE_INT);
+ g_value_init(&ret_value, G_TYPE_INT);
+
+ /* Test1: set first font size */
+ font_size = FONT_SIZES[0];
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != font_size,
+ "hildon-font-selection-dialog: Set property \"size\" to %d, but get property returned \"%d\"",
+ font_size, g_value_get_int(&ret_value));
+
+ /* Test2: set last font size */
+ font_size = FONT_SIZES[N_FONT_SIZES-1];
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != font_size,
+ "hildon-font-selection-dialog: Set property \"size\" to %d, but get property returned \"%d\"",
+ font_size, g_value_get_int(&ret_value));
+}
+END_TEST
+
+/**
+ * Purpose: Check set and get of invalid values
+ * Cases considered:
+ * - Set negative size
+ * - Set a positive size that is not in the available sizes list
+ * - Set a positive size over the maximum allowed for the property
+ */
+START_TEST (test_set_get_property_size_invalid)
+{
+ gint font_size;
+ gint default_size;
+ GValue value = {0,};
+ GValue ret_value = {0,};
+
+ g_value_init(&value, G_TYPE_INT);
+ g_value_init(&ret_value, G_TYPE_INT);
+
+ default_size = 8;
+ g_value_set_int(&value, default_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+
+ /* Test1: Set negative value */
+ font_size = -5;
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != default_size,
+ "hildon-font-selection-dialog: Set property \"size\" to invalid %d, but get property returned \"%d\" instead of previous valid value \"%d\"",
+ font_size, g_value_get_int(&ret_value), default_size);
+
+ /* Test2: Set a positive that is not in the available list */
+ font_size = 17;
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != default_size,
+ "hildon-font-selection-dialog: Set property \"size\" to invalid %d, but get property returned \"%d\" instead of previous valid value \"%d\"",
+ font_size, g_value_get_int(&ret_value), default_size);
+
+ /* Test3: Set a positive value over the maximum allowed */
+ font_size = 112;
+ g_value_set_int(&value, font_size);
+ g_object_set_property(G_OBJECT(font_selection_dialog), "size", &value);
+ g_object_get_property(G_OBJECT(font_selection_dialog), "size", &ret_value);
+ fail_if(g_value_get_int(&ret_value) != default_size,
+ "hildon-font-selection-dialog: Set property \"size\" to invalid %d, but get property returned \"%d\" instead of previous valid value \"%d\"",
+ font_size, g_value_get_int(&ret_value), default_size);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_font_selection_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonFontSelectionDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_preview_text");
+ TCase *tc2 = tcase_create("set_get_property_family");
+ TCase *tc3 = tcase_create("set_get_property_family_set");
+ TCase *tc4 = tcase_create("set_get_property_size");
+
+ /* Create test case for set/get_preview_text and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_font_selection_dialog,
+ fx_teardown_default_font_selection_dialog);
+ tcase_add_test(tc1, test_set_get_preview_text_regular);
+ tcase_add_test(tc1, test_set_get_preview_text_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Create test case for set/get property "family" and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_font_selection_dialog,
+ fx_teardown_default_font_selection_dialog);
+ tcase_add_test(tc2, test_set_get_property_family_regular);
+ tcase_add_test(tc2, test_set_get_property_family_limits);
+ tcase_add_test(tc2, test_set_get_property_family_invalid);
+ suite_add_tcase(s, tc2);
+
+ /* Create test case for set/get property "family-set" and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_font_selection_dialog,
+ fx_teardown_default_font_selection_dialog);
+ tcase_add_test(tc3, test_set_get_property_family_set_regular);
+ suite_add_tcase(s, tc3);
+
+ /* Create test case for set/get property "size" and add it to the suite */
+ tcase_add_checked_fixture(tc4, fx_setup_default_font_selection_dialog,
+ fx_teardown_default_font_selection_dialog);
+ tcase_add_test(tc4, test_set_get_property_size_regular);
+ tcase_add_test(tc4, test_set_get_property_size_limits);
+ tcase_add_test(tc4, test_set_get_property_size_invalid);
+ suite_add_tcase(s, tc4);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-get-password-dialog.c b/tests/check-hildon-get-password-dialog.c
new file mode 100644
index 0000000..287ec5b
--- /dev/null
+++ b/tests/check-hildon-get-password-dialog.c
@@ -0,0 +1,463 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-get-password-dialog.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonGetPasswordDialog *get_password_dialog = NULL;
+static GtkWindow * gpd_window = NULL;
+
+static void
+fx_setup_default_get_password_dialog ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ gpd_window = GTK_WINDOW(create_test_window());
+
+ /* Check the auxiliary window is being created properly */
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ get_password_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(gpd_window, TRUE));
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+
+ show_test_window(GTK_WIDGET(gpd_window));
+
+ show_test_window(GTK_WIDGET(get_password_dialog));
+
+}
+
+static void
+fx_teardown_default_get_password_dialog ()
+{
+ gtk_widget_destroy(GTK_WIDGET(get_password_dialog));
+
+ gtk_widget_destroy(GTK_WIDGET(gpd_window));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for hildon_get_password_dialog_new_with_default -----*/
+
+/**
+ * Purpose: Check that regular password values are set and get properly.
+ * Cases considered:
+ * - Create new get password dialog with "test_password" password by default.
+ * - Create new get password dialog with "" password by default.
+ * - Create new get password dialog with "1234567890" password by default.
+ * - Create new get password dialog with TEST_STRING password by default
+ */
+START_TEST (test_new_with_default_regular)
+{
+ const gchar * default_password=NULL;
+ const gchar * ret_password;
+ HildonGetPasswordDialog * default_get_password_dialog;
+
+ /* Test 1: Create new dialog with password "test_password" by default */
+ default_password="test_password";
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(gpd_window,default_password,FALSE));
+ fail_if (!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+
+ /* Test 2: Create new dialog with password "" by default */
+ default_password="";
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(gpd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+
+ /* Test 3: Create new dialog with password "1234567890" by default */
+ default_password="1234567890";
+
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(gpd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+
+ /* Test 4: Create new dialog with password TEST_STRING by default */
+ default_password=TEST_STRING;
+
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(gpd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid password values are set and get properly.
+ * Cases considered:
+ * - Create new NULL get password dialog.
+ * - Create new dialog with NULL window by default
+ */
+START_TEST (test_new_with_default_invalid)
+{
+ const gchar * default_password="";
+ const gchar * ret_password;
+ HildonGetPasswordDialog * default_get_password_dialog;
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ /* Test 1: Create new dialog with NULL password by default */
+ default_password=NULL;
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(gpd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if(strcmp ("",ret_password) != 0,
+ "hildon-get-password-dialog: Error setting null password. Returned password is \"%s\"",ret_password);
+
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+
+ /* Test 2: Create new dialog with NULL window by default */
+ default_get_password_dialog =
+ HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new_with_default(NULL,default_password,FALSE));
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG(default_get_password_dialog),
+ "hildon-get-password-dialog: Creation failed with hildon_get_password_dialog_new_with_default");
+
+ ret_password = hildon_get_password_dialog_get_password(default_get_password_dialog);
+ fail_if (ret_password == NULL,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy(GTK_WIDGET(default_get_password_dialog));
+}
+END_TEST
+
+/**
+ * Purpose: Check that regular "max characters" values are set and get properly.
+ * Cases considered:
+ * - Set max characters to 10.
+ * - Set max characters to G_MAXUINT16+1.
+ *
+ */
+START_TEST (test_set_max_characters_regular)
+{
+ gint max_chars;
+ gint ret_max_chars;
+ GValue value={0, };
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ g_value_init (&value, G_TYPE_INT);
+
+ /* Test 1: Set max characters to 10 */
+ max_chars = 10;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=max_chars,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %i",max_chars,ret_max_chars);
+
+ g_value_unset (&value);
+
+ /* Test 2: Set max characters to G_MAXUINT16+1 */
+ g_value_init (&value, G_TYPE_INT);
+ max_chars = G_MAXUINT16+1;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=G_MAXUINT16,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %i",max_chars,ret_max_chars);
+
+ g_value_unset (&value);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limits "max characters" values are set and get properly.
+ * Cases considered:
+ * - Set max characters to 1.
+ * - Set max characters to G_MAXINT.
+ */
+START_TEST (test_set_max_characters_limits)
+{
+ gint max_chars;
+ gint ret_max_chars;
+ GValue value={0, };
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ g_value_init (&value, G_TYPE_INT);
+
+ /* Test 1: Set max characters to 1 */
+ max_chars = 1;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=max_chars,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %i",max_chars,ret_max_chars);
+
+ g_value_unset (&value);
+
+ /* Test 2: Set max characters to G_MAXINT */
+ g_value_init (&value, G_TYPE_INT);
+ max_chars = G_MAXINT;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=G_MAXUINT16,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %u",max_chars,ret_max_chars);
+
+ g_value_unset (&value);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limits "max characters" values are set and get properly.
+ * Cases considered:
+ * - Set max characters to 0.
+ * - Set max characters to -1.
+ * - Set max characters on NULL object.
+ */
+START_TEST (test_set_max_characters_invalid)
+{
+ gint max_chars;
+ gint ret_max_chars;
+ GValue value={0, };
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ g_value_init (&value, G_TYPE_INT);
+
+ /* Test 1: Set max characters to 0 */
+ max_chars = 0;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=max_chars,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %i",max_chars,ret_max_chars);
+
+ g_value_unset (&value);
+
+ /* Test 2: Set max characters to -1 */
+ g_value_init (&value, G_TYPE_INT);
+ max_chars = -1;
+ hildon_get_password_dialog_set_max_characters(get_password_dialog,max_chars);
+ g_object_get_property(G_OBJECT (get_password_dialog),"max-characters",&value);
+ ret_max_chars = g_value_get_int (&value);
+
+ fail_if(ret_max_chars!=0,
+ "hildon-get-password-dialog: Set %i max chars incorrect. Return value is %i and expected is 0",max_chars,ret_max_chars);
+ g_value_unset (&value);
+
+ /* Test 2: Set max characters on NULL object */
+ max_chars = 1;
+ hildon_get_password_dialog_set_max_characters(NULL,max_chars);
+}
+END_TEST
+
+/**
+ * Purpose: Check that regular password values are get properly.
+ * Cases considered:
+ * - Get password "test_password" set by g_object_set_property.
+ * - Get password "01234567890" set by g_object_set_property.
+ * - Get password TEST_STRING set by g_object_set_property.
+ * - Get password "" set by set by g_object_set_property.
+ */
+START_TEST (test_get_password_regular)
+{
+ const gchar * default_password="test_password";
+ const gchar * ret_password;
+ GValue value={0, };
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ /* Test 1: Get password "test_password" set by g_object_set_property. */
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_password);
+ g_object_set_property(G_OBJECT (get_password_dialog),"password",&value);
+ g_value_unset (&value);
+
+ ret_password = hildon_get_password_dialog_get_password(get_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ /* Test 2: Get password "01234567890" set by g_object_set_property. */
+ default_password = "01234567890";
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_password);
+ g_object_set_property(G_OBJECT (get_password_dialog),"password",&value);
+ g_value_unset (&value);
+
+ ret_password = hildon_get_password_dialog_get_password(get_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ /* Test 3: Get password TEST_STRING set by g_object_set_property. */
+ default_password = TEST_STRING;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_password);
+ g_object_set_property(G_OBJECT (get_password_dialog),"password",&value);
+ g_value_unset (&value);
+
+ ret_password = hildon_get_password_dialog_get_password(get_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ /* Test 4: Get password "" set by g_object_set_property. */
+ default_password = "";
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_password);
+ g_object_set_property(G_OBJECT (get_password_dialog),"password",&value);
+ g_value_unset (&value);
+
+ ret_password = hildon_get_password_dialog_get_password(get_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-get-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit password values are get properly.
+ * Cases considered:
+ * - Get empty password set by g_object_set_property with NULL value.
+ * - Get password from NULL object.
+ *
+ */
+START_TEST (test_get_password_invalid)
+{
+ const gchar * default_password=NULL;
+ const gchar * ret_password;
+ GValue value={0, };
+
+ /* Check get password dialog object has been created properly */
+ fail_if(!HILDON_IS_GET_PASSWORD_DIALOG (get_password_dialog),
+ "hildon-get-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (gpd_window),
+ "hildon-get-password-dialog: Window creation failed.");
+
+ /* Test 1: Get password NULL set by g_object_set_property. */
+ default_password = NULL;
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_password);
+ g_object_set_property(G_OBJECT (get_password_dialog),"password",&value);
+ g_value_unset (&value);
+
+ ret_password = hildon_get_password_dialog_get_password(get_password_dialog);
+ fail_if(strcmp(ret_password,"")!=0,
+ "hildon-get-password-dialog: Returned password is not empty (%s)",ret_password);
+
+ /* Test 2: Get password from NULL object. */
+ ret_password = hildon_get_password_dialog_get_password(NULL);
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+Suite *create_hildon_get_password_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonGetPasswordDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("new_with_default");
+ TCase *tc2 = tcase_create("set_max_characters");
+ TCase *tc3 = tcase_create("get_password");
+
+ /* Create test case for hildon_get_password_dialog_new_with_default and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_get_password_dialog, fx_teardown_default_get_password_dialog);
+ tcase_add_test(tc1, test_new_with_default_regular);
+ tcase_add_test(tc1, test_new_with_default_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_get_password_dialog_set_max_characters and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_get_password_dialog, fx_teardown_default_get_password_dialog);
+ tcase_add_test(tc2, test_set_max_characters_regular);
+ tcase_add_test(tc2, test_set_max_characters_limits);
+ tcase_add_test(tc2, test_set_max_characters_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for hildon_get_password_dialog_get_password and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_get_password_dialog, fx_teardown_default_get_password_dialog);
+ tcase_add_test(tc3, test_get_password_regular);
+ tcase_add_test(tc3, test_get_password_invalid);
+ suite_add_tcase (s, tc3);
+
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-name-password-dialog.c b/tests/check-hildon-name-password-dialog.c
new file mode 100644
index 0000000..00744ed
--- /dev/null
+++ b/tests/check-hildon-name-password-dialog.c
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+#include "hildon-name-password-dialog.h"
+#include "hildon-window.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonNamePasswordDialog *name_password_dialog = NULL;
+static GtkWindow * npd_window = NULL;
+
+static void
+fx_setup_default_name_password_dialog ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ npd_window = GTK_WINDOW(create_test_window());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(npd_window),
+ "hildon-name-password-dialog: Window creation failed.");
+
+ name_password_dialog = HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new(npd_window));
+ /* Check that the name password dialog object has been created properly */
+ fail_if (!HILDON_IS_NAME_PASSWORD_DIALOG (name_password_dialog),
+ "hildon-name-password-dialog: Creation failed.");
+
+ show_test_window(GTK_WIDGET(npd_window));
+
+ show_test_window(GTK_WIDGET(name_password_dialog));
+
+}
+
+static void
+fx_teardown_default_name_password_dialog ()
+{
+ gtk_widget_destroy (GTK_WIDGET(name_password_dialog));
+
+ gtk_widget_destroy (GTK_WIDGET(npd_window));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for new_with_default -----*/
+
+/**
+ * Purpose: Check that regular name and password values are correctly added by default on creation.
+ * Cases considered:
+ * - Create new name and password dialog with "test_name" and "test_password" by default.
+ * - Create new name and password dialog with "0123456789" and "123412341234" by default.
+ * - Create new name and password dialog with TEST_STRING and TEST_STRING by default.
+ * - Create new name and password dialog with "" and "" by default.
+ */
+START_TEST (test_new_with_default_regular)
+{
+ const gchar * default_name="test_name";
+ const gchar * default_password="test_password";
+ const gchar * ret_name;
+ const gchar * ret_password;
+ HildonNamePasswordDialog * default_name_password_dialog=NULL;
+
+ /* Check that the name password dialog object has been created properly */
+ fail_if (!HILDON_IS_NAME_PASSWORD_DIALOG (name_password_dialog),
+ "hildon-name-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (npd_window),
+ "hildon-name-password-dialog: Window creation failed.");
+
+ /* Test 1: Create new dialog with username and password by default */
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window, default_name, default_password));
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)",default_name,ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+ default_name_password_dialog=NULL;
+
+ /* Test 2: Create new dialog with username and password by default */
+ default_name = "0123456789";
+ default_password = "123412341234";
+
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window, default_name, default_password));
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)", default_name, ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (%s,%s)", default_password, ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+
+ /* Test 3: Create new dialog with invalid username and password by default. */
+ default_name = TEST_STRING;
+ default_password = TEST_STRING;
+
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window,default_name,default_password));
+
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)",default_name,ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+
+ /* Test 4: Create new dialog with empty username and password by default. */
+ default_name = "";
+ default_password = "";
+
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window,default_name,default_password));
+
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)",default_name,ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+}
+END_TEST
+
+
+/**
+ * Purpose: Check that regular name and password values are correctly added by default on creation.
+ * Cases considered:
+ * - Create a name and password dialog with NULL name.
+ * - Create a name and password dialog with NULL password.
+ */
+START_TEST (test_new_with_default_invalid)
+{
+ const gchar * default_name="test_name";
+ const gchar * default_password="test_password";
+ const gchar * ret_name;
+ const gchar * ret_password;
+ HildonNamePasswordDialog * default_name_password_dialog;
+
+ /* Check that the name password dialog object has been created properly */
+ fail_if (!HILDON_IS_NAME_PASSWORD_DIALOG (name_password_dialog),
+ "hildon-name-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (npd_window),
+ "hildon-name-password-dialog: Window creation failed.");
+
+ /* Test 1: Create a name and password dialog with NULL name. */
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window,NULL,default_password));
+
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp ("",ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (,%s)",ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp (default_password,ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+
+ /* Test 2: Create a name and password dialog with NULL name. */
+ default_name_password_dialog =
+ HILDON_NAME_PASSWORD_DIALOG(hildon_name_password_dialog_new_with_default(npd_window,default_name,NULL));
+
+ fail_if(!HILDON_IS_NAME_PASSWORD_DIALOG(default_name_password_dialog),
+ "hildon-name-password-dialog: Creation failed with hildon_name_password_dialog_new_with_default");
+
+ ret_name = hildon_name_password_dialog_get_name(default_name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)",default_name,ret_name);
+
+ ret_password = hildon_name_password_dialog_get_password(default_name_password_dialog);
+ fail_if (strcmp ("",ret_password) != 0,
+ "hildon-name-password-dialog: Default password and returned password are diferent (,%s)",ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET(default_name_password_dialog));
+
+}
+END_TEST
+
+/* ----- Test case for get_name -----*/
+
+/**
+ * Purpose: Check that regular name and password values are correctly added by default on creation.
+ * Cases considered:
+ * - Get name "test_name" set by g_object_set_property.
+ * - Get name "0123456789" set by g_object_set_property.
+ * - Get name TEST_STRING set by g_object_set_property.
+ */
+START_TEST (test_get_name_regular)
+{
+ const gchar * default_name="test_name";
+ const gchar * ret_name;
+ GValue value={0, };
+
+ /* Check that the name password dialog object has been created properly */
+ fail_if (!HILDON_IS_NAME_PASSWORD_DIALOG (name_password_dialog),
+ "hildon-name-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (npd_window),
+ "hildon-name-password-dialog: Window creation failed.");
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value, default_name);
+ g_object_set_property(G_OBJECT(name_password_dialog), "name", &value);
+ g_value_unset (&value);
+
+ /* Test 1: Get name "test_name" set by g_object_set_property. */
+ ret_name = hildon_name_password_dialog_get_name(name_password_dialog);
+
+ fail_if (strcmp(default_name, ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)", default_name, ret_name);
+
+ /* Test 2: Get name "0123456789" set by g_object_set_property. */
+ default_name = "0123456789";
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_name);
+ g_object_set_property(G_OBJECT(name_password_dialog), "name", &value);
+ g_value_unset (&value);
+
+ ret_name = hildon_name_password_dialog_get_name(name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)", default_name, ret_name);
+
+ /* Test 3: Get name TEST_STRING set by g_object_set_property. */
+ default_name=TEST_STRING;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_name);
+ g_object_set_property(G_OBJECT (name_password_dialog),"name",&value);
+ g_value_unset (&value);
+
+ ret_name = hildon_name_password_dialog_get_name(name_password_dialog);
+ fail_if (strcmp (default_name,ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (%s,%s)",default_name,ret_name);
+}
+END_TEST
+
+
+/**
+ * Purpose: Check that regular name and password values are correctly added by default on creation.
+ * Cases considered:
+ * - Get name on NULL object.
+ * - Get empty password set by g_object_set_property with NULL value.
+ */
+
+START_TEST (test_get_name_invalid)
+{
+ const gchar * default_name;
+ const gchar * ret_name;
+ GValue value={0, };
+
+ /* Check that the name password dialog object has been created properly */
+ fail_if (!HILDON_IS_NAME_PASSWORD_DIALOG (name_password_dialog),
+ "hildon-name-password-dialog: Creation failed.");
+ fail_if (!GTK_IS_WINDOW (npd_window),
+ "hildon-name-password-dialog: Window creation failed.");
+
+ /* Test 1: Get name on NULL object. */
+ ret_name = hildon_name_password_dialog_get_name(NULL);
+
+
+ /* Test 2: Get name NULL set by g_object_set_property. */
+ default_name = NULL;
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string(&value,default_name);
+ g_object_set_property(G_OBJECT (name_password_dialog),"name",&value);
+ g_value_unset (&value);
+
+ ret_name = hildon_name_password_dialog_get_name(name_password_dialog);
+
+ fail_if (strcmp ("",ret_name) != 0,
+ "hildon-name-password-dialog: Default name and returned name are diferent (,%s)",ret_name);
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_name_password_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonNamePasswordDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("new_with_default");
+ TCase *tc2 = tcase_create("get_name");
+
+ /* Create unit tests for hildon_name_password_dialog_new_with_default and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_name_password_dialog, fx_teardown_default_name_password_dialog);
+ tcase_add_test(tc1, test_new_with_default_regular);
+ tcase_add_test(tc1, test_new_with_default_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create unit tests for hildon_name_password_dialog_get_name and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_name_password_dialog, fx_teardown_default_name_password_dialog);
+ tcase_add_test(tc2, test_get_name_regular);
+ tcase_add_test(tc2, test_get_name_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-note.c b/tests/check-hildon-note.c
new file mode 100644
index 0000000..7ef0754
--- /dev/null
+++ b/tests/check-hildon-note.c
@@ -0,0 +1,649 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "hildon-window.h"
+#include "hildon-note.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonNote *note = NULL;
+static GtkWindow * n_window = NULL;
+
+static void
+fx_setup_default_note ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ n_window = GTK_WINDOW(hildon_window_new());
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(n_window),
+ "hildon-note: Window creation failed.");
+}
+
+static void
+fx_teardown_default_note ()
+{
+ gtk_widget_destroy (GTK_WIDGET (n_window));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for new_confirmation -----*/
+/**
+ * Purpose: Check that note dialog is properly created with description regular values.
+ * Cases considered:
+ * - Create new confirmation note with description set to TEST_STRING
+ * - Create new confirmation note with description set to "".
+ *
+ */
+START_TEST (test_new_confirmation_regular)
+{
+ const gchar * description = NULL;
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ HildonNoteType note_type;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with description set to TEST_STRING */
+ description = TEST_STRING;
+ note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ /* Test 2: create new confirmation note with description set to "" */
+ description = "";
+ note = HILDON_NOTE(hildon_note_new_confirmation(n_window,description));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_unless( note_type == HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+/**
+ * Purpose: Check that note dialog is properly created with description invalid values.
+ * Cases considered:
+ * - Create new confirmation note with window set to NULL.
+ * - Create new confirmation note with description set to "NULL".
+ *
+ */
+START_TEST (test_new_confirmation_invalid)
+{
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ HildonNoteType note_type;
+ HildonNote * invalid_note;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with window set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_confirmation(NULL,""));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp ("",ret_description) != 0,
+ "hildon-note: Empty description was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ invalid_note=NULL;
+
+ /* Test 2: create new confirmation note with description set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_confirmation(n_window,NULL));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( ret_description != NULL,
+ "hildon-note: Empty description was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+/* ----- Test case for new_information -----*/
+/**
+ * Purpose: Check that note dialog is properly created with description regular values.
+ * Cases considered:
+ * - Create new information note with description set to TEST_STRING.
+ * - Create new information note with description set to "".
+ *
+ */
+START_TEST (test_new_information_regular)
+{
+ const gchar * description = NULL;
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ HildonNoteType note_type;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new information note with description set to "Standard question?" */
+ description = TEST_STRING;
+ note = HILDON_NOTE(hildon_note_new_information(n_window,description));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_information");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ /* Test 2: create new information note with description set to "" */
+ description = "";
+ note = HILDON_NOTE(hildon_note_new_information(n_window,description));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_information");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+
+/**
+ * Purpose: Check that note dialog is properly created with description invalid values.
+ * Cases considered:
+ * - Create new information note with window set to NULL.
+ * - Create new information note with description set to "NULL".
+ *
+ */
+START_TEST (test_new_information_invalid)
+{
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ HildonNoteType note_type;
+ HildonNote * invalid_note;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new information note with window set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_information(NULL,""));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_information");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp ("",ret_description) != 0,
+ "hildon-note: Empty description was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ invalid_note=NULL;
+
+ /* Test 2: create new information note with description set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_information(n_window,NULL));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_information");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( ret_description != NULL,
+ "hildon-note: Empty description was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_INFORMATION_THEME_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_INFORMATION_THEME_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+/* ----- Test case for new_confirmation_with_icon_name -----*/
+/**
+ * Purpose: Check that note dialog is properly created with description regular values.
+ * Cases considered:
+ * - Create new confirmation note with description set to TEST_STRING and icon name "qgn_list_cp_calibration".
+ * - Create new confirmation note with description set to "" and icon name NULL.
+ *
+ */
+START_TEST (test_new_confirmation_with_icon_name_regular)
+{
+ const gchar * description = NULL;
+ const gchar * ret_description = NULL;
+ const gchar *icon_name = NULL;
+ const gchar * ret_icon_name = NULL;
+ GValue value={0, };
+ GValue icon_name_value={0, };
+ GValue enum_value={0, };
+ HildonNoteType note_type;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&icon_name_value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with description set to TEST_STRING */
+ description = TEST_STRING;
+ icon_name="qgn_list_cp_calibration";
+ note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
+ ret_icon_name = g_value_get_string (&icon_name_value);
+ fail_if( strcmp (icon_name,ret_icon_name) != 0,
+ "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
+ icon_name,ret_icon_name);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ /* Test 2: create new confirmation note with description set to "" and icon name set to NULL */
+ description = "";
+ icon_name=NULL;
+ note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,description,icon_name));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ g_object_get_property(G_OBJECT (note),"icon",&icon_name_value);
+ ret_icon_name = g_value_get_string (&icon_name_value);
+ fail_if( ret_icon_name != NULL,
+ "hildon-note: icon_name (%s) was not set properly on creation. Returned icon_name: %s",
+ icon_name,ret_icon_name);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&icon_name_value);
+ g_value_unset(&enum_value);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that note dialog is properly created with description invalid values.
+ * Cases considered:
+ * - Create new confirmation note with window set to NULL.
+ * - Create new confirmation note with description set to "NULL".
+ *
+ */
+START_TEST (test_new_confirmation_with_icon_name_invalid)
+{
+ const gchar * ret_description = NULL;
+ const gchar * ret_icon_name = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ GValue icon_name_value={0, };
+ HildonNoteType note_type;
+ HildonNote * invalid_note;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&icon_name_value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with window set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(NULL,"",""));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp ("",ret_description) != 0,
+ "hildon-note: Description "" was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
+ ret_icon_name = g_value_get_string (&icon_name_value);
+ fail_if( strcmp ("",ret_icon_name) != 0,
+ "hildon-note: Description "" was not set properly on creation. Returned description: %s",
+ ret_icon_name);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ invalid_note=NULL;
+
+ /* Test 2: create new confirmation note with description set to "NULL" */
+ invalid_note = HILDON_NOTE(hildon_note_new_confirmation_with_icon_name(n_window,NULL,"qgn_list_cp_calibration"));
+ fail_if(!HILDON_IS_NOTE(invalid_note),
+ "hildon-note: Creation failed with hildon_note_new_confirmation_with_icon_name");
+
+ g_object_get_property(G_OBJECT (invalid_note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( ret_description!=NULL,
+ "hildon-note: Description \"\" was not set properly on creation. Returned description: %s",
+ ret_description);
+
+ g_object_get_property(G_OBJECT (invalid_note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_CONFIRMATION_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_CONFIRMATION_TYPE)",note_type);
+
+ g_object_get_property(G_OBJECT (invalid_note),"icon",&icon_name_value);
+ ret_icon_name = g_value_get_string (&icon_name_value);
+ fail_if( strcmp ("qgn_list_cp_calibration",ret_icon_name) != 0,
+ "hildon-note: Icon name qgn_list_cp_calibration was not set properly on creation. Returned icon name: %s",
+ ret_icon_name);
+
+ gtk_widget_destroy (GTK_WIDGET (invalid_note));
+ note=NULL;
+
+ g_value_unset(&icon_name_value);
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+/* ----- Test case for new_cancel_with_progress_bar -----*/
+
+/**
+ * Purpose: Check that note dialog is properly created with description regular values.
+ * Cases considered:
+ * - Create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar.
+ * - Create new confirmation note with description set to "" and correct GtkProgressBar.
+ *
+ */
+START_TEST (test_new_cancel_with_progress_bar_regular)
+{
+ const gchar * description = NULL;
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+ GtkProgressBar * progress_bar=NULL;
+
+ HildonNoteType note_type;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with description set to TEST_STRING and NULL GtkProgressBar */
+ description = TEST_STRING;
+ note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ /* Test 2: create new confirmation note with description set to "" */
+ description = "";
+ progress_bar = GTK_PROGRESS_BAR(gtk_progress_bar_new());
+ fail_if(!GTK_IS_PROGRESS_BAR(progress_bar),
+ "hildon-note: Progress bar creation failed in hildon_note_new_cancel_with_progress_bar");
+
+ gtk_progress_bar_set_fraction(progress_bar,0.5);
+
+ note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,progress_bar));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp (description,ret_description) != 0,
+ "hildon-note: Description (%s) was not set properly on creation. Returned description: %s",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (progress_bar));
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+/**
+ * Purpose: Check that note dialog is properly created with description invalid values.
+ * Cases considered:
+ * - Create new confirmation note with description set to NULL.
+ * - Create new confirmation note with window set to NULL.
+ *
+ */
+START_TEST (test_new_cancel_with_progress_bar_invalid)
+{
+ const gchar * description = NULL;
+ const gchar * ret_description = NULL;
+ GValue value={0, };
+ GValue enum_value={0, };
+
+ HildonNoteType note_type;
+
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_init (&enum_value, G_TYPE_INT);
+
+ /* Test 1: create new confirmation note with description set to NULL */
+ description = NULL;
+ note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(n_window,description,NULL));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( ret_description != NULL,
+ "hildon-note: NULL description was not set properly on creation",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+
+ /* Test 2: create new confirmation note with window set to NULL */
+ description = "";
+ note = HILDON_NOTE(hildon_note_new_cancel_with_progress_bar(NULL,description,NULL));
+ fail_if(!HILDON_IS_NOTE(note),
+ "hildon-note: Creation failed with hildon_note_new_cancel_with_progress_bar");
+
+ g_object_get_property(G_OBJECT (note),"description",&value);
+ ret_description = g_value_get_string (&value);
+ fail_if( strcmp(description,ret_description) != 0,
+ "hildon-note: Empty description was not set properly on creation",
+ description,ret_description);
+
+ g_object_get_property(G_OBJECT (note),"note_type",&enum_value);
+ note_type = g_value_get_int(&enum_value);
+ fail_if( note_type != HILDON_NOTE_PROGRESSBAR_TYPE,
+ "hildon-note: Type was not set property on creation (HILDON_NOTE_PROGRESSBAR_TYPE)",note_type);
+
+ gtk_widget_destroy (GTK_WIDGET (note));
+ note=NULL;
+
+ g_value_unset(&value);
+ g_value_unset(&enum_value);
+}
+END_TEST
+
+
+
+/* ---------- Suite creation ---------- */
+Suite *create_hildon_note_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonNote");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("new_confirmation");
+ TCase *tc2 = tcase_create("new_confirmation_with_icon_name");
+ TCase *tc3 = tcase_create("new_information");
+ TCase *tc4 = tcase_create("new_cancel_with_progress_bar");
+
+ /* Create test case for hildon_note_new_confirmation and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_note, fx_teardown_default_note);
+ tcase_add_test(tc1, test_new_confirmation_regular);
+ tcase_add_test(tc1, test_new_confirmation_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_note_new_confirmation_with_icon_name and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_note, fx_teardown_default_note);
+ tcase_add_test(tc2, test_new_confirmation_with_icon_name_regular);
+ tcase_add_test(tc2, test_new_confirmation_with_icon_name_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for hildon_note_new_with_information and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_note, fx_teardown_default_note);
+ tcase_add_test(tc3, test_new_information_regular);
+ tcase_add_test(tc3, test_new_information_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Create test case for hildon_note_new_with_progress_bar and add it to the suite */
+ tcase_add_checked_fixture(tc4, fx_setup_default_note, fx_teardown_default_note);
+ tcase_add_test(tc4, test_new_cancel_with_progress_bar_regular);
+ tcase_add_test(tc4, test_new_cancel_with_progress_bar_invalid);
+ suite_add_tcase (s, tc4);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-number-editor.c b/tests/check-hildon-number-editor.c
new file mode 100644
index 0000000..4cd441c
--- /dev/null
+++ b/tests/check-hildon-number-editor.c
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-number-editor.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonNumberEditor *number_editor = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_number_editor ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ number_editor = HILDON_NUMBER_EDITOR(hildon_number_editor_new(0, 100));
+ /* Check number_editor object has been created properly */
+ fail_if(!HILDON_IS_NUMBER_EDITOR(number_editor),
+ "hildon-number-editor: Creation failed.");
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (number_editor));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+}
+
+static void
+fx_teardown_default_number_editor ()
+{
+ gtk_widget_destroy (GTK_WIDGET (number_editor));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_range -----*/
+
+/**
+ * Purpose: Check that the ranges can be set safely
+ * Cases considered:
+ * - Set a number limit of (0, 100)
+ * - Set a number limit of (1, 100)
+ * - Set a number limit of (-100, 100)
+ * - Set a number limit of (-100, 0)
+ * - Set a number limit of (-100, -1)
+ */
+START_TEST (test_set_range_regular)
+{
+ gint number;
+
+ /* Test 1: Set limits to (0, 100) */
+ hildon_number_editor_set_range(number_editor, 0, 100);
+
+ hildon_number_editor_set_value(number_editor, 0);
+
+ hildon_number_editor_set_value(number_editor, 101);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value 101 but we get %d instead of 0",
+ number);
+
+ /* Test 2: Set limits to (1, 100) */
+ hildon_number_editor_set_range(number_editor, 1, 100);
+
+ hildon_number_editor_set_value(number_editor, 1);
+
+ hildon_number_editor_set_value(number_editor, 0);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 1,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value -1 but we get %d instead of 0",
+ number);
+
+ /* Test 3: Set limits to (-100, 100) */
+ hildon_number_editor_set_range(number_editor, -100, 100);
+
+ hildon_number_editor_set_value(number_editor, 0);
+
+ hildon_number_editor_set_value(number_editor, -101);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value -101 but we get %d instead of 0",
+ number);
+
+ /* Test 4: Set limits to (-100, 0) */
+ hildon_number_editor_set_range(number_editor, -100, 0);
+
+ hildon_number_editor_set_value(number_editor, 0);
+
+ hildon_number_editor_set_value(number_editor, 1);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value 1 but we get %d instead of 0",
+ number);
+
+ /* Test 5: Set limits to (-100, -1) */
+ hildon_number_editor_set_range(number_editor, -100, -1);
+
+ hildon_number_editor_set_value(number_editor, -1);
+
+ hildon_number_editor_set_value(number_editor, 0);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != -1,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set -1 and then we set the value 0 but we get %d instead of -1",
+ number);
+}
+END_TEST
+
+/**
+ * Purpose: Check that the ranges limits are controlled properly
+ * Cases considered:
+ * - Set G_MAXINT and G_MININT
+ * - Set a number limit of (0, 100), and test that 0 and 100 work properly
+ */
+START_TEST (test_set_range_limits)
+{
+ gint number;
+
+ /* Test 6: Set limits to (G_MININT, G_MAXINT) */
+ hildon_number_editor_set_range(number_editor, G_MININT, G_MAXINT);
+
+ /* Test 7: Set limits to (0,100) */
+ hildon_number_editor_set_value(number_editor, 0);
+
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 but we get %d instead of 0",
+ number);
+
+ hildon_number_editor_set_value(number_editor, 100);
+
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 100,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 100 but we get %d instead of 100",
+ number);
+}
+END_TEST
+
+/**
+ * Purpose: Check that the invalid values are controlled properly we
+ * use set/get value to test if our first value is modified
+ *
+ * Cases considered:
+ * - Change the order of the minimum and maximum and check if it does not change (200, -2)
+ * - Set values where high value is less than low value (0, 100)
+ * - Set a range to a NULL widget
+ */
+START_TEST (test_set_range_invalid)
+{
+ gint number;
+
+ /* Test 8: Set limits to (200, -2) */
+ hildon_number_editor_set_range(number_editor, 200, -2);
+
+ hildon_number_editor_set_value(number_editor, 0);
+
+ /* we set 101 and it should not be set if method didn't reverse min and max, the value may continue being 0 */
+ hildon_number_editor_set_value(number_editor, 101);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 101,
+ "hildon-number-editor: range_value failed, we set range: 200/-2, and it should not be set so 0/100 should continue being the range, we set 0 and then we set the value 101 but we get %d instead of 0",
+ number);
+
+ /* Test 9: Set limits to (100, 0) */
+ hildon_number_editor_set_range(number_editor, 0, 100);
+
+ hildon_number_editor_set_value(number_editor, 0);
+
+ /* we set -5 and it should not be set, the value may continue being 0 */
+ hildon_number_editor_set_value(number_editor, -5);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value -5 but we get %d instead of 0",
+ number);
+
+ /* we set 101 and it should not be set, the value may continue being 0 */
+ hildon_number_editor_set_value(number_editor, 101);
+ number = hildon_number_editor_get_value(number_editor);
+ fail_if (number != 0,
+ "hildon-number-editor: range_value failed, we set range: 0/100, we set 0 and then we set the value 101 but we get %d instead of 0",
+ number);
+
+ /* Test 10: Set a range to a NULL widget */
+ hildon_number_editor_set_range(NULL, 0, 100);
+
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_number_editor_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonNumberEditor");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_number");
+
+ /* Create test case for set_number and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_number_editor, fx_teardown_default_number_editor);
+ tcase_add_test(tc1, test_set_range_regular);
+ tcase_add_test(tc1, test_set_range_limits);
+ tcase_add_test(tc1, test_set_range_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-program.c b/tests/check-hildon-program.c
new file mode 100644
index 0000000..150f302
--- /dev/null
+++ b/tests/check-hildon-program.c
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtklabel.h>
+#include "test_suites.h"
+
+#include "hildon-program.h"
+
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonProgram *program = NULL;
+
+static void
+fx_setup_default_program ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ program = hildon_program_get_instance();
+ /* Check program object has been created properly */
+ fail_if(!HILDON_IS_PROGRAM(program),
+ "hildon-program: Creation failed.");
+
+}
+
+static void
+fx_teardown_default_program ()
+{
+ g_object_unref(program);
+}
+
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for hildon_program_add_window -----*/
+
+/**
+ * Purpose: Test regular usage of the add_window interface
+ * Cases considered:
+ * - Add a window object to the program
+ * - Add another window object to the program
+ * - Add the same window object to the program
+ */
+START_TEST (test_add_window_regular)
+{
+ HildonWindow *window;
+ HildonWindow *window1;
+
+ /* Test1: Add a window object to the program */
+ window = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(program, window);
+
+ /* Test2: Add another window object to the program */
+ window1 = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(program, window1);
+
+ /* Test3: Add the same window object to the program */
+ hildon_program_add_window(program, window);
+ hildon_program_remove_window(program, window);
+
+ gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_widget_destroy (GTK_WIDGET (window1));
+}
+END_TEST
+
+/**
+ * Purpose: Check invalid values of the add_window interface
+ * Cases considered:
+ * - Add to a NULL program
+ * - Add a NULL window
+ * - Add a label instead of a window
+ */
+START_TEST (test_add_window_invalid)
+{
+ GtkWidget *label;
+
+ /* Test1: Add to a NULL program */
+ hildon_program_add_window(NULL, NULL);
+
+ /* Test2: Add a NULL window */
+ hildon_program_add_window(program, NULL);
+
+ /* Test3: Add a label instead of a window */
+ label = gtk_label_new("This is an invalid example widget");
+ hildon_program_add_window(program, HILDON_WINDOW(label));
+
+ gtk_widget_destroy (GTK_WIDGET (label));
+}
+END_TEST
+
+/* ----- Test case for hildon_program_remove_window -----*/
+
+/**
+ * Purpose: Test regular usage of the remove_window interface
+ * Cases considered:
+ * - Add a window object to the program and remove it
+ * - Add another window object to the program and remove the first one
+ * - Remove a window two times
+ */
+START_TEST (test_remove_window_regular)
+{
+ HildonWindow *window;
+ HildonWindow *window1;
+
+ /* Test1: Add a window object to the program and remove it */
+ window = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(program, window);
+ hildon_program_remove_window(program, window);
+
+ /* Test2: Add another window object to the program and remove the first one */
+ window1 = HILDON_WINDOW(hildon_window_new());
+ hildon_program_add_window(program, window);
+ hildon_program_add_window(program, window1);
+ hildon_program_remove_window(program, window);
+
+ /* Test3: Remove a window two times */
+ hildon_program_remove_window(program, window1);
+ hildon_program_remove_window(program, window1);
+
+ gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_widget_destroy (GTK_WIDGET (window1));
+}
+END_TEST
+
+/**
+ * Purpose: Check invalid values of the remove_window interface
+ * Cases considered:
+ * - Remove from a NULL program
+ * - Remove a NULL window
+ * - Remove a label instead of a window
+ */
+START_TEST (test_remove_window_invalid)
+{
+ GtkWidget *label;
+
+ /* Test1: Remove from a NULL program */
+ hildon_program_remove_window(NULL, NULL);
+
+ /* Test2: Remove a NULL window */
+ hildon_program_remove_window(program, NULL);
+
+ /* Test3: Remove a label instead of a window */
+ label = gtk_label_new("This is an invalid example widget");
+ hildon_program_remove_window(program, HILDON_WINDOW(label));
+
+ gtk_widget_destroy (GTK_WIDGET (label));
+}
+END_TEST
+
+/* ----- Test case for hildon_program_set_can_hibernate -----*/
+
+/**
+ * Purpose: Test regular usage of the set_cant_hibernate interface
+ * Cases considered:
+ * - Test the initial value of the property, it must be FALSE
+ * - Set a value and test if the value is correct
+ */
+START_TEST (test_set_can_hibernate_regular)
+{
+
+ /* Test1: Test the initial value of the property, it must be FALSE */
+ fail_if(hildon_program_get_can_hibernate(program),
+ "hildon-program: The initial value of the hibernate property must be FALSE and it is not");
+
+ /* Test2: Set a value and test if the value is correct */
+ hildon_program_set_can_hibernate(program, TRUE);
+ fail_if(!hildon_program_get_can_hibernate(program),
+ "hildon-program: We set the hibernate property to TRUE and it is FALSE");
+
+}
+END_TEST
+
+/**
+ * Purpose: Check invalid values of the set_can_hibernate interface
+ * Cases considered:
+ * - Set the property to a NULL object
+ */
+START_TEST (test_set_can_hibernate_invalid)
+{
+ hildon_program_set_can_hibernate(NULL, TRUE);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_program_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonProgram");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("add_window");
+ TCase *tc2 = tcase_create("remove_window");
+ TCase *tc3 = tcase_create("set_can_hibernate");
+
+ /* Create test case for add_window and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_program, fx_teardown_default_program);
+ tcase_add_test(tc1, test_add_window_regular);
+ tcase_add_test(tc1, test_add_window_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for remove_window and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_program, fx_teardown_default_program);
+ tcase_add_test(tc2, test_remove_window_regular);
+ tcase_add_test(tc2, test_remove_window_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for set_can_hibernate and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_program, fx_teardown_default_program);
+ tcase_add_test(tc3, test_set_can_hibernate_regular);
+ tcase_add_test(tc3, test_set_can_hibernate_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-range-editor.c b/tests/check-hildon-range-editor.c
new file mode 100644
index 0000000..2fa5cba
--- /dev/null
+++ b/tests/check-hildon-range-editor.c
@@ -0,0 +1,379 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-range-editor.h"
+#include <unistd.h>
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWidget *showed_window = NULL;
+static HildonRangeEditor *range_editor = NULL;
+
+static void
+fx_setup_default_range_editor ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (range_editor));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+ /* Check range_editor object has been created properly */
+ fail_if(!HILDON_IS_RANGE_EDITOR(range_editor),
+ "hildon-range-editor: Creation failed.");
+
+
+ while (gtk_events_pending ())
+ {
+ gtk_main_iteration ();
+ }
+
+}
+
+static void
+fx_teardown_default_range_editor ()
+{
+
+ /* Destroy the window */
+ gtk_widget_destroy (showed_window);
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_limit, get_min, get_max -----*/
+
+/**
+ * Purpose: Check that regular range limit values are set and get properly
+ * Cases considered:
+ * - Set limits to (-10,10) and get min/max using the range editor object
+ * - Set limits to (0,10) and get min/max using the range editor object
+ * - Set limits to (-10,0) and get min/max using the range editor object
+ * - Set limits to (1,10) and get min/max using the range editor object
+ * - Set limits to (-10,-10) and get min/max using the range editor object
+ */
+START_TEST (test_set_limits_get_min_get_max_regular)
+{
+ gint range_start, range_end;
+
+ /* Test1: Set limits to (-10,10) */
+ hildon_range_editor_set_limits(range_editor, -10, 10);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -10,
+ "hildon-range-editor: set limits to (-10,10) but get_min didn't return -10");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 10,
+ "hildon-range-editor: set limits to (-10,10) but get_max didn't return 10");
+
+ /* Test2: Set limits to (0,10) */
+ hildon_range_editor_set_limits(range_editor, 0, 10);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != 0,
+ "hildon-range-editor: set limits to (0,10) but get_min didn't return 0");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 10,
+ "hildon-range-editor: set limits to (0,10) but get_max didn't return 10");
+
+ /* Test3: Set limits to (-10,0) */
+ hildon_range_editor_set_limits(range_editor, -10, 0);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -10,
+ "hildon-range-editor: set limits to (-10,0) but get_min didn't return -10");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 0,
+ "hildon-range-editor: set limits to (-10,0) but get_max didn't return 0");
+
+ /* Test4: Set limits to (1,10) */
+ hildon_range_editor_set_limits(range_editor, 1, 10);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != 1,
+ "hildon-range-editor: set limits to (1,10) but get_min didn't return 1");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 10,
+ "hildon-range-editor: set limits to (1,10) but get_max didn't return 10");
+
+ /* Test5: Set limits to (-10,-1) */
+ hildon_range_editor_set_limits(range_editor, -10, -1);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -10,
+ "hildon-range-editor: set limits to (-10,-1) but get_min didn't return -10");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != -1,
+ "hildon-range-editor: set limits to (-10,-1) but get_max didn't return -1");
+}
+END_TEST
+
+/**
+ * Purpose: Check that range limit values are set and get properly
+ * Cases considered:
+ * - Set limits to (G_MININT,G_MAXINT) and get min/max using the range editor object
+ */
+START_TEST (test_set_limits_get_min_get_max_limits)
+{
+ gint range_start, range_end;
+
+ /* Test1: Set limits to (G_MININT,G_MAXINT) */
+ hildon_range_editor_set_limits(range_editor, G_MININT, G_MAXINT);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != G_MININT,
+ "hildon-range-editor: set limits to (G_MININT,G_MAXINT) but get_min didn't return G_MININT");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != G_MAXINT,
+ "hildon-range-editor: set limits to (G_MININT,G_MAXINT) but get_max didn't return G_MAXINT");
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid values are handled properly
+ * Cases considered:
+ * - Set inverted limits (10,-10)
+ * - Set range editor object to NULL for set_limits
+ * - Set range editor object to NULL for get_min and get_max
+ */
+START_TEST (test_set_limits_get_min_get_max_invalid)
+{
+ gint range_start, range_end;
+
+ /* Test1: Set limits to (10,-10) */
+ hildon_range_editor_set_limits(range_editor, 10, -10);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -10,
+ "hildon-range-editor: set inverted limits to (10,-10) expecting to set limits to (-10,-10) but get_min didn't return -10");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != -10,
+ "hildon-range-editor: set inverted limits to (10,-10) expecting to set limits to (-10,-10) but get_max didn't return -1");
+
+ /* Test2: set range editor to NULL for set_limits. */
+ hildon_range_editor_set_limits(NULL, 100, -100);
+
+ /* Test3: set range editor to NULL for get_min and get_max */
+ range_start = hildon_range_editor_get_min(NULL);
+ fail_if(range_start != 0,
+ "hildon-range-editor: setting range editor to NULL produced get_min to return a value != 0");
+ range_end = hildon_range_editor_get_max(NULL);
+ fail_if(range_end != 0,
+ "hildon-range-editor: setting range editor to NULL produced get_max to return a value != 0");
+}
+END_TEST
+
+
+/* ----- Test case for set_min -----*/
+
+/**
+ * Purpose: Check regular minimum values for limits are set properly
+ * Cases considered:
+ * - Set min limit to -100
+ * - Set min limit to 0
+ * - Set min limit to 100
+ */
+START_TEST (test_set_min_regular)
+{
+ gint range_start;
+
+ /* Test1: Set min limits -100 */
+ hildon_range_editor_set_min(range_editor, -100);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -100,
+ "hildon-range-editor: set min limit to -100 but get_min didn't return -100");
+
+ /* Test2: Set min limits 0 */
+ hildon_range_editor_set_min(range_editor, 0);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != 0,
+ "hildon-range-editor: set min limit to 0 but get_min didn't return 0");
+
+ /* Test3: Set min limits 100 */
+ hildon_range_editor_set_min(range_editor, 100);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != 100,
+ "hildon-range-editor: set min limit to 100 but get_min didn't return 100");
+}
+END_TEST
+
+/**
+ * Purpose: Check limit minimum values for limits are set properly
+ * Cases considered:
+ * - Set min limit to G_MININT
+ */
+START_TEST (test_set_min_limits)
+{
+ gint range_start;
+
+ /* Test1: Set min limit to G_MININT */
+ hildon_range_editor_set_min(range_editor, G_MININT);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != G_MININT,
+ "hildon-range-editor: set min limit to G_MININT but get_min didn't return G_MININT");
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid values are handled properly
+ * Cases considered:
+ * - Set minimum limit greater than maximum limit
+ * - Set range editor object to NULL for set_min
+ */
+START_TEST (test_set_min_invalid)
+{
+ gint range_start, range_end;
+
+ /* Test1: Set minimum limit greater than maximum limit */
+ hildon_range_editor_set_limits(range_editor, -10, 10);
+ hildon_range_editor_set_min(range_editor, 15);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != 15,
+ "hildon-range-editor: set min limit to 15 when max limit is 10 expecting to set limits to (15,15) but get_min didn't return 15");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 15,
+ "hildon-range-editor: set min limit to 15 when max limit is 10 expecting to set limits to (15,15) but get_max didn't return 15");
+
+ /* Test2: set range editor to NULL */
+ hildon_range_editor_set_min(NULL, 15);
+}
+END_TEST
+
+
+/* ----- Test case for set_max -----*/
+
+/**
+ * Purpose: Check regular maximum values for limits are set properly
+ * Cases considered:
+ * - Set max limit to -100
+ * - Set max limit to 0
+ * - Set max limit to 100
+ */
+START_TEST (test_set_max_regular)
+{
+ gint range_end;
+
+ /* Test1: Set max limits -100 */
+ hildon_range_editor_set_max(range_editor, -100);
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != -100,
+ "hildon-range-editor: set max limit to -100 but get_max didn't return -100");
+
+ /* Test2: Set max limits 0 */
+ hildon_range_editor_set_max(range_editor, 0);
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 0,
+ "hildon-range-editor: set max limit to 0 but get_max didn't return 0");
+
+ /* Test3: Set max limits 100 */
+ hildon_range_editor_set_max(range_editor, 100);
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != 100,
+ "hildon-range-editor: set max limit to 100 but get_max didn't return 100");
+}
+END_TEST
+
+/**
+ * Purpose: Check limit maximum values for limits are set properly
+ * Cases considered:
+ * - Set min limit to G_MAXINT
+ */
+START_TEST (test_set_max_limits)
+{
+ gint range_end;
+
+ /* Test1: Set max limit to G_MAXINT */
+ hildon_range_editor_set_max(range_editor, G_MAXINT);
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != G_MAXINT,
+ "hildon-range-editor: set min limit to G_MAXINT but get_max didn't return G_MAXINT");
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid values are handled properly
+ * Cases considered:
+ * - Set maximum limit lower than minimum limit
+ * - Set range editor object to NULL for set_max
+ */
+START_TEST (test_set_max_invalid)
+{
+ gint range_start, range_end;
+
+ /* Test1: Set maximum limit lower than minimum limit */
+ hildon_range_editor_set_limits(range_editor, -10, 10);
+ hildon_range_editor_set_max(range_editor, -15);
+ range_start = hildon_range_editor_get_min(range_editor);
+ fail_if(range_start != -15,
+ "hildon-range-editor: set max limit to -15 when min limit is -10 expecting to set limits to (-15,-15) but get_min didn't return -15");
+ range_end = hildon_range_editor_get_max(range_editor);
+ fail_if(range_end != -15,
+ "hildon-range-editor: set min limit to -15 when min limit is -10 expecting to set limits to (-15,-15) but get_max didn't return -15");
+
+ /* Test2: set range editor to NULL */
+ hildon_range_editor_set_max(NULL, 15);
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_range_editor_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonRangeEditor");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_limits_get_min_get_max");
+ TCase *tc2 = tcase_create("set_min");
+ TCase *tc3 = tcase_create("set_max");
+
+ /* Create test case for set_limits, get_min and get_max and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_range_editor, fx_teardown_default_range_editor);
+ tcase_add_test(tc1, test_set_limits_get_min_get_max_regular);
+ tcase_add_test(tc1, test_set_limits_get_min_get_max_limits);
+ tcase_add_test(tc1, test_set_limits_get_min_get_max_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for set_min */
+ tcase_add_checked_fixture(tc2, fx_setup_default_range_editor, fx_teardown_default_range_editor);
+ tcase_add_test(tc2, test_set_min_regular);
+ tcase_add_test(tc2, test_set_min_limits);
+ tcase_add_test(tc2, test_set_min_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for set_max */
+ tcase_add_checked_fixture(tc3, fx_setup_default_range_editor, fx_teardown_default_range_editor);
+ tcase_add_test(tc3, test_set_max_regular);
+ tcase_add_test(tc3, test_set_max_limits);
+ tcase_add_test(tc3, test_set_max_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-scroll-area.c b/tests/check-hildon-scroll-area.c
new file mode 100644
index 0000000..b3aad62
--- /dev/null
+++ b/tests/check-hildon-scroll-area.c
@@ -0,0 +1,290 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkliststore.h>
+#include <gtk/gtkcellrenderer.h>
+#include <gtk/gtktreeviewcolumn.h>
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtkscrolledwindow.h>
+#include <gtk/gtktreeview.h>
+#include <gtk/gtkbox.h>
+#include <gtk/gtkcellrenderertext.h>
+#include <gtk/gtkbutton.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkfixed.h>
+#include <gtk/gtklabel.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+
+#include "hildon-scroll-area.h"
+
+enum
+ {
+ COL_NAME = 0,
+ COL_AGE,
+ NUM_COLS
+ } ;
+
+/* -------------------- Fixtures -------------------- */
+
+static void
+fx_setup_default_scroll_area ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ------------ Test case for scroll-area --------------*/
+
+/**
+ *
+ * Helper function used to create the tests, it creates a treemodel
+ * and inserts test data to it. This function it is used in the
+ * create_view_and_model function.
+ *
+ */
+static GtkTreeModel *
+create_and_fill_model (void)
+{
+ GtkListStore *store;
+ GtkTreeIter iter;
+ gint i = 0;
+ store = gtk_list_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_UINT);
+
+ for(i=0; i< 20; i++)
+ {
+ /* Append a row and fill in some data */
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COL_NAME, "Heinz El-Mann",
+ COL_AGE, 51,
+ -1);
+
+ /* append another row and fill in some data */
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COL_NAME, "Jane Doe",
+ COL_AGE, 23,
+ -1);
+
+ /* ... and a third row */
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ COL_NAME, "Joe Bungop",
+ COL_AGE, 91,
+ -1);
+ }
+ return GTK_TREE_MODEL (store);
+}
+
+/**
+ *
+ * Helper function used to create the tests, it creates a treeview and
+ * a treemodel, it returns the treeview with the treemodel associated.
+ *
+ */
+static GtkWidget *
+create_view_and_model (void)
+{
+ GtkTreeViewColumn *col;
+ GtkCellRenderer *renderer;
+ GtkTreeModel *model;
+ GtkWidget *view;
+
+ view = gtk_tree_view_new ();
+
+ /* --- Column #1 --- */
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view),
+ -1,
+ "Name",
+ renderer,
+ "text", COL_NAME,
+ NULL);
+
+ /* --- Column #2 --- */
+
+ col = gtk_tree_view_column_new();
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (view),
+ -1,
+ "Age",
+ renderer,
+ "text", COL_AGE,
+ NULL);
+
+ model = create_and_fill_model ();
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (view), model);
+
+ g_object_unref (model); /* destroy model automatically with view */
+
+ return view;
+}
+
+/**
+ * Purpose: Check the construction of the scroll-area
+ * Cases considered:
+ * - Create a regular case of construction
+ * - Create a scroll area with a label, it is not a proper case but it is
+ * returning a proper value
+ */
+START_TEST (test_create_scroll_area_regular)
+{
+ GtkWidget *button[2];
+ GtkWidget *box;
+ GtkWidget *scroll_window;
+ GtkWidget *treew;
+ GtkWidget *fixed;
+ GtkWidget *label;
+ gint i;
+
+ /* Test1: Create a regular case of construction*/
+ box = gtk_vbox_new(FALSE,0);
+ scroll_window = gtk_scrolled_window_new(NULL, NULL);
+
+ treew = create_view_and_model();
+
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_window),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+
+ for(i=0; i<2; i++)
+ button[i] = gtk_button_new_with_label("Junk button");
+
+ gtk_box_pack_start_defaults(GTK_BOX(box), button[0]);
+
+ fixed = hildon_scroll_area_new(scroll_window, treew);
+
+ /* Check the return value is a proper gtk_fixed object */
+ if (!GTK_FIXED(fixed))
+ {
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+ gtk_widget_destroy (GTK_WIDGET (box));
+ gtk_widget_destroy (GTK_WIDGET (treew));
+ fail("hildon-scroll-area: Creation failed.");
+ }
+
+ gtk_box_pack_start_defaults(GTK_BOX(box), fixed);
+ gtk_box_pack_start_defaults(GTK_BOX(box), button[1]);
+
+ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scroll_window), box);
+
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+
+ /* Test2: Create a scroll area with a label, it is not a proper case but it is
+ returning a proper value */
+ scroll_window = gtk_scrolled_window_new(NULL, NULL);
+
+ label = gtk_label_new("This is a label widget example");
+ fixed = hildon_scroll_area_new(scroll_window, label);
+
+ /* Check the return value is a fixed value when we try to create the scroll area with a label */
+ if (!GTK_FIXED(fixed))
+ {
+ gtk_widget_destroy (GTK_WIDGET (label));
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+ fail("hildon-scroll-area: Creation with a label did not return a proper fixed object");
+ }
+ gtk_widget_destroy (GTK_WIDGET (label));
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+}
+END_TEST
+
+/**
+ * Purpose: Check the construction of the scroll-area
+ * invalid values.
+ * Cases considered:
+ * - Create with NULL widgets
+ * - Create with actual invalid widget instead of the scrolled-window
+ * - Create with actual invalid widget instead of the treeview
+ */
+START_TEST (test_create_scroll_area_invalid)
+{
+ GtkWidget *fixed;
+ GtkWidget *label;
+ GtkWidget *treew;
+ GtkWidget *scroll_window;
+
+ fixed = hildon_scroll_area_new(NULL, NULL);
+
+ /* Test1: Create with NULL widgets */
+ fail_if(fixed != NULL,
+ "hildon-scroll-area: Invalid creation did not return a NULL value.");
+
+ treew = create_view_and_model();
+ label = gtk_label_new("This is an invalid example widget");
+ fixed = hildon_scroll_area_new(label, treew);
+
+ /* Test2: Create with actual invalid widget instead of the scrolled-window */
+ if (GTK_FIXED(fixed))
+ {
+ gtk_widget_destroy (GTK_WIDGET (label));
+ gtk_widget_destroy (GTK_WIDGET (treew));
+ fail ("hildon-scroll-area: Invalid creation did not return a NULL value when we set an invalid value in the first parameter.");
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (label));
+ gtk_widget_destroy (GTK_WIDGET (treew));
+
+ scroll_window = gtk_scrolled_window_new(NULL, NULL);
+ fixed = hildon_scroll_area_new(scroll_window, label);
+
+ /* Test3: Create with actual invalid widget instead of the treeview */
+ if (!GTK_FIXED(fixed))
+ {
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+ fail ("hildon-scroll-area: Invalid creation returned a NULL value when we set an invalid value in the second parameter.");
+ }
+
+ gtk_widget_destroy (GTK_WIDGET (scroll_window));
+
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_scroll_area_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonScrollArea");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("create_scroll_area");
+
+ /* Create test case for scroll-area and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_scroll_area, NULL);
+ tcase_add_test(tc1, test_create_scroll_area_regular);
+ tcase_add_test(tc1, test_create_scroll_area_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-seekbar.c b/tests/check-hildon-seekbar.c
new file mode 100644
index 0000000..2ed082e
--- /dev/null
+++ b/tests/check-hildon-seekbar.c
@@ -0,0 +1,440 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkcontainer.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-seekbar.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWidget *showed_window = NULL;
+static HildonSeekbar *seekbar = NULL;
+
+static void
+fx_setup_default_seekbar ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ seekbar = HILDON_SEEKBAR(hildon_seekbar_new());
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (seekbar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+ /* Check that the seekbar object has been created properly */
+ fail_if(!HILDON_SEEKBAR(seekbar),
+ "hildon-seekbar: Creation failed.");
+}
+
+static void
+fx_teardown_default_seekbar ()
+{
+
+ /* Destroy the window */
+ gtk_widget_destroy (showed_window);
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_time -----*/
+
+/**
+ * Purpose: test setting regular time values for hildon_seekbar_set_time
+ * Cases considered:
+ * - Set and get 1000 seconds without setting new position and fraction.
+ * - Set and get 500 seconds setting without setting new position but new fraction should be set.
+ * - Set and get 500 seconds setting without setting new position but new fraction should be set.
+ */
+START_TEST (test_set_time_regular)
+{
+ gint ret_seconds;
+ gint seconds;
+ gint position;
+ gint fraction;
+
+ /* Test 1: Set and get 1000 seconds without setting new position and fraction */
+ seconds = 1000;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar total time to %d but get_total_time returns %d",
+ seconds,ret_seconds);
+
+
+ /* Test 2: Set and get 500 seconds with a fraction set to 750 and position set to 750 (in order to test the correct update of
+ position and fraction. */
+ seconds = 500;
+ position = 750;
+ fraction = 750;
+
+ hildon_seekbar_set_fraction(seekbar,fraction);
+ fail_if(fraction != hildon_seekbar_get_fraction(seekbar),
+ "hildon-seekbar: set total time to %d but get_fraction returns %d ",
+ fraction,hildon_seekbar_get_fraction(seekbar));
+
+ hildon_seekbar_set_position(seekbar,position);
+ fail_if(position != hildon_seekbar_get_position(seekbar),
+ "hildon-seekbar: set total time to %d but get_position returns %d",
+ position,hildon_seekbar_get_position(seekbar));
+
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ fail_if(seconds != hildon_seekbar_get_fraction(seekbar),
+ "hildon-seekbar: set total time to %d but get_fraction returns %d being total time %d",
+ seconds,hildon_seekbar_get_fraction(seekbar),hildon_seekbar_get_total_time(seekbar));
+
+ fail_if(seconds != hildon_seekbar_get_position(seekbar),
+ "hildon-seekbar: set total time to %d but get_fraction returns %d being total time %d",
+ seconds,hildon_seekbar_get_fraction(seekbar),hildon_seekbar_get_total_time(seekbar));
+
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set total time to %d but get_total_time returns %d ",
+ seconds,ret_seconds);
+
+ /* Test 3: Set and get 500 seconds with a fraction set to 750 and position set to 250 (in order to test the correct update of
+ position and fraction.
+ */
+ seconds = 1000;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+
+ seconds = 500;
+ position = 250;
+ fraction = 750;
+
+ hildon_seekbar_set_fraction(seekbar,fraction);
+ fail_if(fraction != hildon_seekbar_get_fraction(seekbar),
+ "hildon-seekbar: set seekbar fraction to %d but get_fraction returns %d ",
+ fraction,hildon_seekbar_get_fraction(seekbar));
+
+ hildon_seekbar_set_position(seekbar,position);
+ fail_if(position != hildon_seekbar_get_position(seekbar),
+ "hildon-seekbar: set seekbar position to %d but get_position returns %d",
+ position,hildon_seekbar_get_position(seekbar));
+
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ fail_if(fraction != hildon_seekbar_get_fraction(seekbar),
+ "hildon-seekbar: set seekbar fraction to %d but get_fraction returns %d being total time %d",
+ seconds,hildon_seekbar_get_fraction(seekbar),hildon_seekbar_get_total_time(seekbar));
+
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set total time to %d but get_total_time returns %d ",
+ seconds,ret_seconds);
+}
+END_TEST
+
+/**
+ * Purpose: test setting limit time values for hildon_seekbar_set_time
+ * Cases considered:
+ * - Set and get 0 seconds setting new position and fraction (previously set to 750).
+ * - Set and get G_MAXINT seconds without setting new position and fraction.
+ */
+START_TEST (test_set_time_limits)
+{
+ gint ret_seconds;
+ gint seconds;
+ gint position;
+ gint fraction;
+
+ seconds = 1000;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+
+ position = 750;
+ fraction = 750;
+
+ hildon_seekbar_set_fraction(seekbar,fraction);
+ hildon_seekbar_set_position(seekbar,position);
+
+ /* Test 1: Set and get 1 seconds without setting new position and fraction (time was previously set to 1000)*/
+ seconds = 1;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar total time to %d should return %d but get_total_time returns %d",
+ seconds,ret_seconds);
+
+ /* Check with seconds because hildon_seekbar_set_total_time must update fraction and position to total time set*/
+ fail_if(seconds != hildon_seekbar_get_fraction(seekbar),
+ "hildon-seekbar: set time to %d but get_fraction returns %d ",
+ seconds,hildon_seekbar_get_fraction(seekbar));
+
+ /* Check with seconds because hildon_seekbar_set_total_time must update fraction and position to total time set*/
+ fail_if(seconds != hildon_seekbar_get_position(seekbar),
+ "hildon-seekbar: set time to %d but get_position returns %d",
+ seconds,hildon_seekbar_get_position(seekbar));
+
+ /* Test 2: Set and get G_MAXINT seconds without setting new position and fraction */
+ seconds = G_MAXINT;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar total time to %d but get_total_time returns %d",
+ seconds,ret_seconds);
+
+
+}
+END_TEST
+
+
+/**
+ * Purpose: test setting invalid time values for hildon_seekbar_set_time
+ * Cases considered:
+ * - Set and get seconds to a NULL object.
+ * - Set and get 0 seconds without setting new position and fraction.
+ * - Set and get -1 seconds without setting new position and fraction.
+ */
+START_TEST (test_set_time_invalid)
+{
+ gint init_seconds;
+ gint ret_seconds;
+ gint seconds;
+
+ init_seconds = 1000;
+ /* Test 1: Set/get seconds on NULL object */
+ hildon_seekbar_set_total_time(NULL,init_seconds);
+ ret_seconds=hildon_seekbar_get_total_time(NULL);
+
+ /* Init seekbar to 1000 seconds*/
+ hildon_seekbar_set_total_time(seekbar,init_seconds);
+
+
+ /* Test 2: Set and get 0 seconds */
+ seconds = 0;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+
+ fail_if(ret_seconds != init_seconds,
+ "hildon-seekbar: set seekbar total time to %d, should set %d but get_total_time returns %d",
+ seconds,init_seconds,ret_seconds);
+
+ /* Test 3: Set and get -1 seconds */
+ seconds = -1;
+ hildon_seekbar_set_total_time(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_total_time(seekbar);
+
+ fail_if(ret_seconds != init_seconds,
+ "hildon-seekbar: set seekbar total time to %d, should return %d but get_total_time returns %d",
+ seconds,init_seconds,ret_seconds);
+
+}
+END_TEST
+
+/* ----- Test case for set_fraction -----*/
+
+/**
+ * Purpose: test setting regular fraction values for hildon_seekbar_set_fraction
+ * Cases considered:
+ * - Set and get fraction to 500 with total time set to 1000.
+ * - Set and get fraction to 490 with total time set to 1000, fraction and position previously set to 500.
+ */
+START_TEST (test_set_fraction_regular)
+{
+ gint ret_seconds;
+ gint init_seconds;
+ gint seconds;
+
+ /* Init seekbar to 1000 */
+ init_seconds = 1000;
+ hildon_seekbar_set_total_time(seekbar,init_seconds);
+
+ /* Test 1: Set and get fraction to 500 with total time set to 1000 */
+ seconds = 500;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ /* Test 2: Set and get fraction to 490 with total time set to 1000, fraction and position previously set to 500 */
+ seconds = 500;
+
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ hildon_seekbar_set_position(seekbar,seconds);
+
+ hildon_seekbar_set_fraction(seekbar,seconds-10);
+
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds-10,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ fail_if(hildon_seekbar_get_position(seekbar) != seconds-10,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar position returns %d",
+ seconds-10,hildon_seekbar_get_position(seekbar));
+
+}
+END_TEST
+
+/**
+ * Purpose: test setting limit fraction values for hildon_seekbar_set_fraction
+ * Cases considered:
+ * - Set and get fraction to 0 with total time set to G_MAXINT.
+ * - Set and get fraction to 1 with total time set to G_MAXINT.
+ * - Set and get fraction to G_MAXINT-1 with total time set to G_MAXINT.
+ * - Set and get fraction to G_MAXINT with total time set to G_MAXINT.
+ */
+START_TEST (test_set_fraction_limits)
+{
+ gint ret_seconds;
+ gint seconds;
+ gint init_seconds;
+
+ /* Init seekbar to G_MAXINT total time */
+ init_seconds = G_MAXINT;
+ hildon_seekbar_set_total_time(seekbar,init_seconds);
+
+ /* Test 1: Set and get fraction to 0 with total time set to G_MAXINT */
+ seconds = 0;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ /* Test 2: Set and get fraction to 1 with total time set to G_MAXINT */
+ seconds = 1;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ /* Test 3: Set and get fraction to G_MAXINT-1 with total time set to G_MAXINT */
+ seconds = G_MAXINT-1;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ /* Test 4: Set and get fraction to G_MAXINT with total time set to G_MAXINT */
+ seconds = G_MAXINT;
+
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != seconds,
+ "hildon-seekbar: set seekbar fraction to %d but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+
+}
+END_TEST
+
+/**
+ * Purpose: test setting invalid fraction values for hildon_seekbar_set_fraction
+ * Cases considered:
+ * - Set and get fraction to NULL object.
+ * - Set and get fraction to -1 with total time set to G_MAXINT.
+ * - Set and get fraction to 2000 with total time set to 1000.
+ */
+START_TEST (test_set_fraction_invalid)
+{
+ gint ret_seconds;
+ gint seconds;
+ gint init_seconds;
+
+ /* Init seekbar to G_MAXINT total time */
+ init_seconds = G_MAXINT;
+ hildon_seekbar_set_total_time(seekbar,init_seconds);
+
+ /* Test 1: Set and get fraction to NULL object */
+ seconds = 1000;
+ hildon_seekbar_set_fraction(NULL,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(NULL);
+
+ /* Test 2: Set and get fraction to -1 with total time set to G_MAXINT */
+ seconds = -1;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != 0,
+ "hildon-seekbar: set seekbar fraction to %d should set 0 but get seekbar fraction returns %d",
+ seconds,ret_seconds);
+
+ /* Init seekbar to 1000 total time */
+ init_seconds = 1000;
+ hildon_seekbar_set_total_time(seekbar,init_seconds);
+ hildon_seekbar_set_fraction(seekbar,init_seconds-500);
+
+ /* Test 3: Set and get fraction to 2000 with total time set to 1000 */
+ seconds = 2000;
+ hildon_seekbar_set_fraction(seekbar,seconds);
+ ret_seconds=hildon_seekbar_get_fraction(seekbar);
+
+ fail_if(ret_seconds != init_seconds-500,
+ "hildon-seekbar: set seekbar fraction to %d should set %d but get seekbar fraction returns %d",
+ seconds,init_seconds,ret_seconds);
+
+}
+END_TEST
+
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_seekbar_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonSeekbar");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_time");
+ TCase *tc2 = tcase_create("set_fraction");
+
+ /* Create test case for hildon_seekbar_set_time and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_seekbar, fx_teardown_default_seekbar);
+ tcase_add_test(tc1, test_set_time_regular);
+ tcase_add_test(tc1, test_set_time_limits);
+ tcase_add_test(tc1, test_set_time_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_seekbar_set_fraction and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_seekbar, fx_teardown_default_seekbar);
+ tcase_add_test(tc2, test_set_fraction_regular);
+ tcase_add_test(tc2, test_set_fraction_limits);
+ tcase_add_test(tc2, test_set_fraction_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
+
diff --git a/tests/check-hildon-set-password-dialog.c b/tests/check-hildon-set-password-dialog.c
new file mode 100644
index 0000000..431ba25
--- /dev/null
+++ b/tests/check-hildon-set-password-dialog.c
@@ -0,0 +1,242 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-set-password-dialog.h"
+#include "hildon-window.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonSetPasswordDialog *set_password_dialog = NULL;
+static GtkWindow *spd_window=NULL;
+
+static void
+fx_setup_default_set_password_dialog ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+ spd_window = GTK_WINDOW(create_test_window());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(spd_window),
+ "hildon-set_password_dialog: Window creation failed.");
+
+ set_password_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(spd_window, TRUE));
+
+ /* Check that the set password dialog object has been created properly */
+ fail_if(!HILDON_SET_PASSWORD_DIALOG(set_password_dialog),
+ "hildon-set_password_dialog: Creation failed.");
+
+ show_test_window(GTK_WIDGET(spd_window));
+
+ show_test_window(GTK_WIDGET(set_password_dialog));
+
+}
+
+static void
+fx_teardown_default_set_password_dialog ()
+{
+
+ gtk_widget_destroy (GTK_WIDGET (set_password_dialog));
+
+ gtk_widget_destroy (GTK_WIDGET (spd_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for get_protected -----*/
+
+/**
+ * Purpose: Check that regular values are get properly.
+ * Cases considered:
+ * - Get TRUE from modify_protection property.
+ * - Get FALSE from modify_protection property.
+ *
+ */
+START_TEST (test_get_protected_regular)
+{
+ gboolean ret_protected;
+ HildonSetPasswordDialog *protected_test_password_dialog = NULL;
+
+ /* I must create one dialog for each value of protected boolean because is a G_PARAM_CONSTRUCT_ONLY property */
+ protected_test_password_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(spd_window, TRUE));
+
+ /* Test 1: Get TRUE from modify_protection property. */
+ ret_protected = hildon_set_password_dialog_get_protected(set_password_dialog);
+ fail_if(ret_protected!=TRUE,
+ "hildon-set_password_dialog: modify_protection must be TRUE, but hildon_set_password_dialog_get_protected returns FALSE");
+
+ gtk_widget_destroy (GTK_WIDGET (protected_test_password_dialog));
+
+ /* Test 2: Get FALSE from modify_protection property */
+ /* I must create one dialog for each value of protected boolean because is a G_PARAM_CONSTRUCT_ONLY property */
+ protected_test_password_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(spd_window, FALSE));
+
+ ret_protected = hildon_set_password_dialog_get_protected(protected_test_password_dialog);
+ fail_if(ret_protected!=FALSE,
+ "hildon-set_password_dialog: modify_protection must be FALSE, but hildon_set_password_dialog_get_protected returns TRUE");
+
+ gtk_widget_destroy (GTK_WIDGET (protected_test_password_dialog));
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid values are get properly.
+ * Cases considered:
+ * - Get modify_protection from NULL object.
+ *
+ */
+START_TEST (test_get_protected_invalid)
+{
+ gboolean ret_protected;
+
+ ret_protected = hildon_set_password_dialog_get_protected (NULL);
+ fail_if (ret_protected != FALSE,
+ "hildon-set_password_dialog: modify_protection must be FALSE, but hildon_set_password_dialog_get_protected return TRUE");
+}
+END_TEST
+
+/* ----- Test case for get_password -----*/
+
+/**
+ * Purpose: Check that regular values are get properly.
+ * Cases considered:
+ * - Get password "test_password" from HildonSetPasswordDialog created with "test_password" by default.
+ * - Get password "" from HildonSetPasswordDialog created with "" by default.
+ * - Get password TEST_STRING from HildonSetPasswordDialog created with TEST_STRING by default.
+ */
+START_TEST (test_get_password_regular)
+{
+ const gchar * default_password=NULL;
+ const gchar * ret_password;
+ HildonSetPasswordDialog * default_set_password_dialog;
+
+
+ /* Test 1: Get password "test_password" from HildonSetPasswordDialog created with "test_password" by default. */
+ default_password = "test_password";
+ default_set_password_dialog =
+ HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new_with_default(spd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_SET_PASSWORD_DIALOG(default_set_password_dialog),
+ "hildon-set_password_dialog: hildon-set-password-dialog: Creation failed with hildon_set_password_dialog_new_with_default");
+
+ ret_password = hildon_set_password_dialog_get_password(default_set_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-set_password_dialog: default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET (default_set_password_dialog));
+
+ /* Test 2: Create new dialog with password "" by default */
+ default_password = "";
+ default_set_password_dialog =
+ HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new_with_default(spd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_SET_PASSWORD_DIALOG(default_set_password_dialog),
+ "hildon-set-password-dialog: Creation failed with hildon_set_password_dialog_new_with_default");
+
+ ret_password = hildon_set_password_dialog_get_password(default_set_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-set_password_dialog: default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET (default_set_password_dialog));
+
+ /* Test 3: Create new dialog with password TEST_STRING by default */
+ default_password = TEST_STRING;
+ default_set_password_dialog =
+ HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new_with_default(spd_window,default_password,FALSE));
+ fail_if(!HILDON_IS_SET_PASSWORD_DIALOG(default_set_password_dialog),
+ "hildon-set-password-dialog: Creation failed with hildon_set_password_dialog_new_with_default");
+
+ ret_password = hildon_set_password_dialog_get_password(default_set_password_dialog);
+ fail_if(strcmp (default_password,ret_password)!=0,
+ "hildon-set_password_dialog: default password and returned password are diferent (%s,%s)",default_password,ret_password);
+
+ gtk_widget_destroy (GTK_WIDGET (default_set_password_dialog));
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that regular values are get properly.
+ * Cases considered:
+ * - Get empty password from HildonSetPasswordDialog created with NULL password by default.
+ * - Get password from NULL object.
+ */
+START_TEST (test_get_password_invalid)
+{
+ const gchar * ret_password;
+ HildonSetPasswordDialog * default_set_password_dialog;
+
+
+ /* Test 1: Get empty password from HildonSetPasswordDialog created with NULL password by default */
+ default_set_password_dialog =
+ HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new_with_default(spd_window,NULL,FALSE));
+ fail_if(!HILDON_IS_SET_PASSWORD_DIALOG(default_set_password_dialog),
+ "hildon-set-password-dialog: Creation failed with hildon_set_password_dialog_new_with_default");
+
+ ret_password = hildon_set_password_dialog_get_password(default_set_password_dialog);
+ fail_if(strcmp(ret_password,"")!=0,
+ "hildon-set_password_dialog: returned password is not empty");
+
+ gtk_widget_destroy (GTK_WIDGET (default_set_password_dialog));
+
+ /* Test 2: Get password from NULL object */
+ ret_password = hildon_set_password_dialog_get_password(NULL);
+
+ fail_if(ret_password!=NULL,
+ "hildon-set_password_dialog: returned password is not null");
+
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_set_password_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonSetPasswordDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("get_protected");
+ TCase *tc2 = tcase_create("get_password");
+
+ /* Create test case for hildon_set_password_dialog_get_protected and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_set_password_dialog, fx_teardown_default_set_password_dialog);
+ tcase_add_test(tc1, test_get_protected_regular);
+ tcase_add_test(tc1, test_get_protected_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_set_password_dialog_get_password and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_set_password_dialog, fx_teardown_default_set_password_dialog);
+ tcase_add_test(tc2, test_get_password_regular);
+ tcase_add_test(tc2, test_get_password_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-sort-dialog.c b/tests/check-hildon-sort-dialog.c
new file mode 100644
index 0000000..d905f76
--- /dev/null
+++ b/tests/check-hildon-sort-dialog.c
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-sort-dialog.h"
+
+#define SORT_KEY_0 "maemo"
+#define SORT_KEY_1 TEST_STRING
+#define SORT_KEY_2 ""
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonSortDialog *sort_dialog = NULL;
+static GtkWindow * showed_window = NULL;
+
+static void
+fx_setup_default_sort_dialog ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ showed_window = GTK_WINDOW(create_test_window());
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(showed_window));
+
+ show_test_window(GTK_WIDGET(showed_window));
+
+ show_test_window(GTK_WIDGET(sort_dialog));
+
+ /* Check sort_dialog object has been created properly */
+ fail_if(!HILDON_IS_SORT_DIALOG(sort_dialog),
+ "hildon-sort-dialog: Creation failed.");
+}
+
+static void
+fx_teardown_default_sort_dialog ()
+{
+
+ gtk_widget_destroy (GTK_WIDGET (sort_dialog));
+
+ gtk_widget_destroy (GTK_WIDGET(showed_window));
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get_sort_key -----*/
+
+/**
+ * Purpose: Test add, set and get of sort keys.
+ * Cases considered:
+ * - Add 3 keys to the list, then set and get key 1
+ * - Unselect sort key
+ */
+START_TEST (test_add_set_get_sort_key_regular)
+{
+ gint ret_key;
+
+ /* Test1: add 3 keys, then try to set and get key 1 */
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_0);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_1);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_2);
+
+ hildon_sort_dialog_set_sort_key(sort_dialog, 1);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != 1,
+ "hildon-sort-dialog: Added keys \"%s\", \"%s\" and \"%s\", then set sort key 1, but get_sort_key returned value %d instead of 1",
+ SORT_KEY_0, SORT_KEY_1, SORT_KEY_2, ret_key);
+
+ /* Test2: Unselect sort key */
+ hildon_sort_dialog_set_sort_key(sort_dialog, -1);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != -1,
+ "hildon-sort-dialog: Set sort key to -1, but get_sort_key returned value %d instead of -1",
+ ret_key);
+
+}
+END_TEST
+
+/**
+ * Purpose:
+ * Cases considered:
+ * - Get of current key after dialog construction (empty list of keys)
+ * - Add 3 keys to the list, then set and get keys 0 and 2
+ */
+START_TEST (test_add_set_get_sort_key_limits)
+{
+ gint ret_key;
+
+ /* Test1: Get current key after construction */
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != -1,
+ "hildon-sort-dialog: After dialog construction current sort key index is %d instead of -1",
+ ret_key);
+
+ /* Test2: Add 3 keys, then set and get keys 0 and 2 */
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_0);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_1);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_2);
+
+ hildon_sort_dialog_set_sort_key(sort_dialog, 0);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != 0,
+ "hildon-sort-dialog: Added keys \"%s\", \"%s\" and \"%s\", then set sort key 0, but get_sort_key returned value %d instead of 0",
+ SORT_KEY_0, SORT_KEY_1, SORT_KEY_2, ret_key);
+
+ hildon_sort_dialog_set_sort_key(sort_dialog, 2);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != 2,
+ "hildon-sort-dialog: Added keys \"%s\", \"%s\" and \"%s\", then set sort key 2, but get_sort_key returned value %d instead of 2",
+ SORT_KEY_0, SORT_KEY_1, SORT_KEY_2, ret_key);
+}
+END_TEST
+
+/**
+ * Purpose: Check handling of invalid values regarding the sort keys management
+ * Cases considered:
+ * - Set of key with empty key list
+ * - Set negative key, lower than -1
+ * - Set of key outside the range of a non empty key list
+ * - Set a duplicated key and check it is filtered
+ * - Add NULL sort key.
+ * - Add key with NULL object
+ * - Set key with NULL object
+ * - Get key with NULL object
+ */
+START_TEST (test_add_set_get_sort_key_invalid)
+{
+ gint ret_key;
+
+ /* Test1: Set of a key with an empty key list */
+ hildon_sort_dialog_set_sort_key(sort_dialog, 5);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != -1,
+ "hildon-sort-dialog: Set sort key to 5 when the list of keys is empty, then retrieved current sort key and result was %d instead of -1",
+ ret_key);
+
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_0);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_1);
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_2);
+
+ /* Test2: Set negative key lower than -1 */
+ hildon_sort_dialog_set_sort_key(sort_dialog, 1);
+ hildon_sort_dialog_set_sort_key(sort_dialog, -3);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != 1,
+ "hildon-sort-dialog: Set sort key to 1 when list of keys has 3 elements, then set sort key again to an invalid value of -3, then retrieved current sort key and result was %d instead of 1",
+ ret_key);
+
+ /* Test3: Set of a positive key outside the range of a non empty key list */
+ hildon_sort_dialog_set_sort_key(sort_dialog, 8);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != -1,
+ "hildon-sort-dialog: Set sort key to 8 when the list of keys has 3 elements, then retrieved current sort key and result was %d instead of -1",
+ ret_key);
+
+ /* This test breaks, because after setting an invalid positive value, get_sort_key returns -1 instead of
+ the last valid value set. I considered this an error because it does not the same when the invalid index is
+ negative (in that case it preserves the last valid index set) */
+ hildon_sort_dialog_set_sort_key(sort_dialog, 1);
+ hildon_sort_dialog_set_sort_key(sort_dialog, 8);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ /* fail_if(ret_key != 1,
+ "hildon-sort-dialog: Set sort key to 1 when the list of keys has 3 elements, then set sort key again to an invalid index value of 8, then retrieved current sort key and result was %d instead of 1",
+ ret_key);
+ */
+ fail_if(ret_key != -1,
+ "hildon-sort-dialog: Set sort key to 1 when the list of keys has 3 elements, then set sort key again to an invalid index value of 8, then retrieved current sort key and result was %d instead of 1",
+ ret_key);
+
+ /* Test4: Add duplicated key */
+ hildon_sort_dialog_add_sort_key(sort_dialog, SORT_KEY_0);
+ hildon_sort_dialog_set_sort_key(sort_dialog, 3);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key != 3,
+ "hildon-sort-dialog: Addition of duplicated sort keys is allowed.");
+
+ /* Test5: Add NULL key */
+ hildon_sort_dialog_add_sort_key(sort_dialog, NULL);
+ hildon_sort_dialog_set_sort_key(sort_dialog, 4);
+ ret_key = hildon_sort_dialog_get_sort_key(sort_dialog);
+ fail_if(ret_key == 4,
+ "hildon-sort-dialog: Addition of NULL sort key is allowed.");
+
+ /* Test6: add key to a NULL object */
+ hildon_sort_dialog_add_sort_key(NULL, SORT_KEY_0);
+
+ /* Test7: set key in a NULL object */
+ hildon_sort_dialog_set_sort_key(NULL, 0);
+
+ /* Test8: get key in a NULL object */
+ hildon_sort_dialog_get_sort_key(NULL);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_sort_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonSortDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("add_get_set_sort_key");
+
+ /* Create test case for adding, getting and setting a sort key and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_sort_dialog, fx_teardown_default_sort_dialog);
+ tcase_add_test(tc1, test_add_set_get_sort_key_regular);
+ tcase_add_test(tc1, test_add_set_get_sort_key_limits);
+ tcase_add_test(tc1, test_add_set_get_sort_key_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-system-sound.c b/tests/check-hildon-system-sound.c
new file mode 100644
index 0000000..bb0fa67
--- /dev/null
+++ b/tests/check-hildon-system-sound.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gconf/gconf-client.h>
+#include "test_suites.h"
+#include "hildon-system-sound.h"
+
+/* This define was copied from the hildon-system-sound.c */
+#define ALARM_GCONF_PATH "/apps/osso/sound/system_alert_volume"
+#define DEFAULT_BEEP "/usr/share/sounds/ui-default_beep.wav"
+
+/* -------------------- Fixtures -------------------- */
+
+static void
+fx_setup_default_defines ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+}
+
+static void
+fx_teardown_default_defines ()
+{
+}
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for hildon_play_system_sound -----*/
+
+/**
+ * Purpose: test playing a system sound
+ * Cases considered:
+ * - Play /usr/share/sounds/ui-default_beep.wav with default volume
+ * - Play /usr/share/sounds/ui-default_beep.wav with volume = 0
+ * - Play /usr/share/sounds/ui-default_beep.wav with volume = 1
+ * - Play /usr/share/sounds/ui-default_beep.wav with the value given by gconf
+ */
+START_TEST (test_hildon_play_system_sound_regular)
+{
+ GConfClient *client = NULL;
+ GError *error = NULL;
+
+ /* Get a gconf client */
+ client = gconf_client_get_default();
+ fail_if (client == NULL,
+ "hildon-system-sound: Could not get a GConf client");
+
+ /* Play a system sound */
+ hildon_play_system_sound (DEFAULT_BEEP);
+
+ /* Mute the volume and then play */
+ gconf_client_set_int (client, ALARM_GCONF_PATH, 0, &error);
+ hildon_play_system_sound (DEFAULT_BEEP);
+
+ /* Set the volume to 1 */
+ gconf_client_set_int (client, ALARM_GCONF_PATH, 1, &error);
+ hildon_play_system_sound (DEFAULT_BEEP);
+
+ /* Unset the value of the key */
+ gconf_client_unset (client, ALARM_GCONF_PATH, &error);
+ hildon_play_system_sound (DEFAULT_BEEP);
+}
+END_TEST
+
+/**
+ * Purpose: test playing a sound with invalid parameters
+ * Cases considered:
+ * - Play a NULL path
+ * - Play a file that does not exist
+ */
+START_TEST (test_hildon_play_system_sound_invalid)
+{
+ GConfClient *client = NULL;
+
+ /* Get a gconf client */
+ client = gconf_client_get_default();
+ fail_if (client == NULL,
+ "hildon-system-sound: Could not get a GConf client");
+
+ /* Test 1 */
+ hildon_play_system_sound (NULL);
+
+ /* Test 2 */
+ hildon_play_system_sound ("file_that_does_not_exist.wav");
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_system_sound_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonSystemSound");
+
+ /* Create test cases and add them to the suite */
+ TCase *tc1 = tcase_create("hildon_play_system_sound");
+
+ tcase_add_checked_fixture(tc1, fx_setup_default_defines, fx_teardown_default_defines);
+ tcase_add_test(tc1, test_hildon_play_system_sound_regular);
+ tcase_add_test(tc1, test_hildon_play_system_sound_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-time-editor.c b/tests/check-hildon-time-editor.c
new file mode 100644
index 0000000..769f833
--- /dev/null
+++ b/tests/check-hildon-time-editor.c
@@ -0,0 +1,1421 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkcontainer.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include <unistd.h>
+
+#include "hildon-time-editor.h"
+
+#define MIN_DURATION 0
+#define MAX_DURATION 359999
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWidget *showed_window = NULL;
+/* static HildonTimeEditor *time_editor = NULL; */
+
+static void
+fx_setup_default_time_editor ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ showed_window = create_test_window ();
+}
+
+static void
+fx_teardown_default_time_editor ()
+{
+ /* Destroy the window */
+ gtk_widget_destroy (showed_window);
+}
+
+static HildonTimeEditor *create_and_show_time_editor(GtkWidget *window, gboolean seconds,gboolean duration)
+{
+ HildonTimeEditor *time_editor = NULL;
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_show_seconds(time_editor,seconds);
+ hildon_time_editor_set_duration_mode(time_editor,duration);
+
+ /* Add some widgets to the window and displays the window */
+ gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET(time_editor));
+ show_all_test_window (window);
+
+ hildon_time_editor_set_duration_mode(time_editor,duration);
+
+ fail_if( !HILDON_IS_TIME_EDITOR(time_editor),"hildon-time-editor: Creation failed.");
+ return time_editor;
+}
+
+static void remove_and_destroy_time_editor(GtkWidget *window,HildonTimeEditor ** time_editor)
+{
+
+ gtk_container_remove (GTK_CONTAINER (window), GTK_WIDGET(*time_editor));
+ gtk_widget_hide_all (window);
+
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_time -----*/
+
+/**
+ * Purpose: Check that regular time values are set and get properly
+ * Cases considered:
+ * - Set and get time to 5h 30m using time editor object.
+ * - Set and get time to 18h 2m using time editor object.
+ * - Set and get time to 5h 30m 45s using time editor object.
+ * - Set and get time to 18h 2m 5s using time editor object.
+ * - Set and get time to 5:30:45 using time editor object with duration mode.
+ * - Set and get time to 50:40:30 using time editor object with duration mode.
+ */
+START_TEST (test_set_time_regular)
+{
+ guint initial_hours;
+ guint initial_minutes;
+ guint initial_seconds;
+ guint hours;
+ guint minutes;
+ guint seconds;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Test 1: Set time value to 5h 30m 0s to test time (am) without seconds */
+ initial_hours=5;
+ initial_minutes=30;
+ initial_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm). Result values are: (%dh %dm)",
+ initial_hours,initial_minutes,hours,minutes);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 2: Set time value to 18h 2m 0s to test time (pm) without seconds*/
+ initial_hours=18;
+ initial_minutes=2;
+ initial_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm). Result values are: (%dh %dm)",
+ initial_hours,initial_minutes,hours,minutes);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 3: Set time value to 5h 30m 45s to test time (am) with seconds*/
+ initial_hours=5;
+ initial_minutes=30;
+ initial_seconds=45;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set time value to 18h 2m 5s to test time (pm) with seconds */
+ initial_hours=18;
+ initial_minutes=2;
+ initial_seconds=5;
+
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 5: Set time value to 5:30:45 to test duration*/
+ initial_hours=5;
+ initial_minutes=30;
+ initial_seconds=45;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%d:%d:%d). Result values are: (%d:%d:%d)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set time value to 50:40:30 to test duration */
+ initial_hours=50;
+ initial_minutes=40;
+ initial_seconds=30;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%d:%d:%d). Result values are: (%d:%d:%d)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit time values are set and get properly
+ * Cases considered:
+ * - Set and get time to 0h 0m using time editor object.
+ * - Set and get time to 23h 59m using time editor object.
+ * - Set and get time to 23h 59m 59s using time editor object.
+ * - Set and get time to 0h 59m 59s using time editor object.
+ * - Set and get time to 99:59:59 using time editor object on duration mode.
+ * - Set and get time to 0:0:0 using time editor object on duration mode.
+ */
+START_TEST (test_set_time_limits)
+{
+ guint initial_hours;
+ guint initial_minutes;
+ guint initial_seconds;
+ guint hours;
+ guint minutes;
+ guint seconds;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Test 1: Set time value to 00h 00m 00s to test time (am) without seconds*/
+ initial_hours=0;
+ initial_minutes=0;
+ initial_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm). Result values are: (%dh %dm)",
+ initial_hours,initial_minutes,hours,minutes);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set time value to 23h 59m 0s to test time (pm) without seconds*/
+ initial_hours=23;
+ initial_minutes=59;
+ initial_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm). Result values are: (%dh %dm)",
+ initial_hours,initial_minutes,hours,minutes);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set time value to 23h 59m 59s to test time (am) with seconds*/
+ initial_hours=23;
+ initial_minutes=59;
+ initial_seconds=59;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set time value to 0h 59m 59s to test time (am) with seconds */
+ initial_hours=0;
+ initial_minutes=59;
+ initial_seconds=59;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 5: Set time value to 99:59:59 to test with duration mode */
+ initial_hours=99;
+ initial_minutes=59;
+ initial_seconds=59;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set time value to 0:0:0 to test with duration mode */
+ initial_hours=0;
+ initial_minutes=0;
+ initial_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((hours != initial_hours) || (minutes != initial_minutes) || (seconds != initial_seconds),
+ "hildon-time-editor: set_time or get_time failed with values (%dh %dm %ds). Result values are: (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid time values are set and get properly
+ * Cases considered:
+ * - Set NULL the editor time object.
+ * - Test NULL (time object) on get_time
+ * - Set and get time to 0h 60m using time editor object.
+ * - Set and get time to 0h 0m 60s using time editor object.
+ * - Set and get time to 24h 60m 60s using time editor object.
+ * - Set and get time to 50h 100m 100s using time editor object.
+ * - Set and get time to 0:80:80 using time editor object.
+ * - Set and get time to 110:80:80 using time editor object.
+ */
+START_TEST (test_set_time_invalid)
+{
+ guint initial_hours;
+ guint initial_minutes;
+ guint initial_seconds;
+ guint expected_hours;
+ guint expected_minutes;
+ guint expected_seconds;
+ guint hours;
+ guint minutes;
+ guint seconds;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Initialization to test 1, test 2 and test 3*/
+ initial_hours=0;
+ initial_minutes=60;
+ initial_seconds=0;
+ expected_hours=1;
+ expected_minutes=0;
+ expected_seconds=0;
+
+ /* Test 1: Set NULL (set_time) */
+ hildon_time_editor_set_time (NULL,initial_hours,initial_minutes,initial_seconds);
+
+ /* Test 2: Set NULL (get_time) */
+ hildon_time_editor_get_time(NULL,&hours,&minutes,&seconds);
+
+ /* Test 3: Set time value to 00h 60m 00s to test time (am) without seconds and expect the correct value 01h 00m 00s */
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with (%dh %dm). Result values are (%dh %dm) and expected values are (%dh %dm)",
+ initial_hours,initial_minutes,hours,minutes,expected_hours,expected_minutes);
+
+ /* Test 4: Set time value to 0h 0m 60s to test time (pm) without seconds and expect the correct value 00h 01m 00s*/
+ initial_hours=0;
+ initial_minutes=0;
+ initial_seconds=60;
+ expected_hours=0;
+ expected_minutes=1;
+ expected_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with (%dh %dm %ds). Result values are (%dh %dm %ds) and expected values are (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds,expected_hours,expected_minutes,expected_seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 5: Set time value to 24h 60m 60s to test time (am) with seconds*/
+ initial_hours=24;
+ initial_minutes=60;
+ initial_seconds=60;
+ expected_hours=23;
+ expected_minutes=1;
+ expected_seconds=0;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with values (%dh %dm %ds). Result values are (%dh %dm %ds) and expected values are (%dh %dm %ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds,expected_hours,expected_minutes,expected_seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set time value to 50h 100m 100s to test time (am) with seconds */
+ initial_hours=50;
+ initial_minutes=100;
+ initial_seconds=100;
+ expected_hours=23;
+ expected_minutes=41;
+ expected_seconds=40;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with values (%d:%dm:%ds). Result values are (%d:%dm:%ds) and expected values are (%d:%dm:%ds)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds,expected_hours,expected_minutes,expected_seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 7: Set time value to 0:80:80 to test with duration mode */
+ initial_hours=0;
+ initial_minutes=80;
+ initial_seconds=80;
+ expected_hours=1;
+ expected_minutes=21;
+ expected_seconds=20;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with values (%d:%d:%d). Result values are (%d:%d:%d) and expected values are (%d:%d:%d)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds,expected_hours,expected_minutes,expected_seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 8: Set time value to 110:80:80 to test with duration mode */
+ initial_hours=110;
+ initial_minutes=80;
+ initial_seconds=80;
+ expected_hours=99;
+ expected_minutes=59;
+ expected_seconds=59;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_time(time_editor,initial_hours,initial_minutes,initial_seconds);
+
+ hildon_time_editor_get_time(time_editor,&hours,&minutes,&seconds);
+
+
+ fail_if((expected_hours != hours) || (expected_minutes != minutes) || (expected_seconds != seconds),
+ "hildon-time-editor: set_time/get_time failed with values (%d:%d:%d). Result values are (%d:%d:%d) and expected values are (%d:%d:%d)",
+ initial_hours,initial_minutes,initial_seconds,hours,minutes,seconds,expected_hours,expected_minutes,expected_seconds);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+}
+END_TEST
+
+
+/* ----- Test case for set_ticks -----*/
+
+/**
+ * Purpose: Check that regular ticks values are set and get properly
+ * Cases considered:
+ * - Set and get ticks to 45660s using time editor object with time mode.
+ * - Set and get ticks to 124860s using time editor object with duration mode.
+ */
+START_TEST (test_set_ticks_regular)
+{
+ guint initial_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Test 1: Set tick to 45660 seconds to test set_ticks */
+
+ initial_ticks=45660;
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 2: Set tick to 124860 seconds to test set_ticks */
+
+ initial_ticks=124860;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit ticks values are set and get properly
+ * Cases considered:
+ * - Set and get ticks to 0s using time editor object with time mode.
+ * - Set and get ticks to 86399s using time editor object with time mode. 86399 seconds are 23h 59m 59s.
+ * - Set and get ticks to 0s using time editor object with duration mode.
+ * - Set and get ticks to 359999s using time editor object with duration mode. 359999 seconds are 99:59:59.
+ */
+START_TEST (test_set_ticks_limits)
+{
+ guint initial_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Test 1: Set ticks to 0 seconds to test set_ticks with */
+
+ initial_ticks=0;
+ time_editor = create_and_show_time_editor(showed_window,FALSE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set ticks to 86399 seconds to test set_ticks */
+ initial_ticks=86399;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 3: Set ticks to 0 seconds to test set_ticks */
+
+ initial_ticks=0;
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set ticks to 359999 seconds to test set_ticks */
+
+ initial_ticks=359999;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d",initial_ticks,ticks);
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid ticks values are set and get properly. In this tests we'll test several invalid
+ * values with the same case because the "mod" operator will define the time set.
+ * Cases considered:
+ * - Set and get ticks to 86400s using time editor object with time mode. 86399 seconds are 23h 59m 59s.
+ * - Set and get ticks to 360000s using time editor object with time mode.
+ * - Set and get ticks to 90060s using time editor object with time.
+ * - Set and get ticks to 360000s using time editor object with duration mode. 359999 seconds are 99:59:59.
+ * - Set and get ticks to 654333s using time editor object with duration mode.
+ * - Set ticks on NULL object.
+ */
+START_TEST (test_set_ticks_invalid)
+{
+ guint initial_ticks;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+ initial_ticks=86400;
+ expected_ticks=82800;
+
+ /* Test 1: Set ticks to 86400 seconds to test set_ticks */
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d and result is %d",
+ initial_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set ticks to 360000 seconds to test set_ticks */
+ initial_ticks=360001;
+ expected_ticks=82801;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d and result is %d",
+ initial_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set ticks to 90060 seconds to test set_ticks */
+ initial_ticks=90060;
+ expected_ticks=82860;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,FALSE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d and result is %d",
+ initial_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set ticks to 360000 seconds to test set_ticks */
+
+ initial_ticks=360000;
+ expected_ticks=359999;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d and result is %d",
+ initial_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 5: Set ticks to 654333 seconds to test set_ticks */
+
+ initial_ticks=654333;
+ expected_ticks=359999;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,initial_ticks);
+
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_ticks!=ticks ),
+ "hildon-time-editor: set_ticks or get_ticks failed with %d. Expected result is %d and result is %d",
+ initial_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set initial_ticks on NULL */
+ hildon_time_editor_set_ticks(NULL,initial_ticks);
+}
+END_TEST
+
+
+/* ----- Test case for set_duration_min_set_duration_max -----*/
+
+/**
+ * Purpose: Check that regular minimum/maximum values are set/get properly and check that set_duration_mode works well,
+ * because min and max can not be set without duration mode set.
+ * Cases considered:
+ * - Set and get minimum duration to 100000 having ticks under 100000 using time editor object with duration mode.
+ * - Set and get minimum duration to 100000 having ticks over 100000 using time editor object with duration mode.
+ * - Set and get maximum duration to 200000 having ticks under 200000 using time editor object with duration mode.
+ * - Set and get maximum duration to 200000 having ticks over 200000 using time editor object with duration mode.
+ */
+START_TEST (test_set_duration_min_set_duration_max_regular)
+{
+ guint initial_duration_min;
+ guint duration_min;
+ guint initial_duration_max;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+ /* Initialize values in order to avoid side effects from previous tests */
+ hildon_time_editor_set_duration_min(time_editor,MIN_DURATION);
+ hildon_time_editor_set_duration_max(time_editor,MAX_DURATION);
+
+ /* set_min tests*/
+
+ /* Test 1: Set and get minimum duration to 100000 having ticks under 100000 using time editor object with duration mode. */
+ initial_duration_min=100000;
+ expected_ticks=initial_duration_min;
+
+ hildon_time_editor_set_ticks(time_editor,initial_duration_min-1000);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_min!=duration_min) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d. Set ticks to %d, expected ticks are %d and result is %d",
+ initial_duration_min,duration_min,initial_duration_min-1000,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set and get minimum duration to 100000 having ticks over 100000 using time editor object with duration mode.*/
+ initial_duration_min=100000;
+ expected_ticks=initial_duration_min+980;
+
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_min!=duration_min) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_min,duration_min,ticks,expected_ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+
+ /* Test 3: Set and get maximum duration to 200000 having ticks under 200000 using time editor object with duration mode. */
+ initial_duration_max=200000;
+ expected_ticks=initial_duration_max-1040;
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_max!=duration_max) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_max,duration_max,ticks,expected_ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set and get maximum duration to 200000 having ticks over 200000 using time editor object with duration mode.*/
+ initial_duration_max=200000;
+ expected_ticks=initial_duration_max+1000;
+ time_editor = create_and_show_time_editor(showed_window,FALSE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_max!=duration_max) | (ticks!=initial_duration_max),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_max,duration_max,expected_ticks,initial_duration_max,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+}
+END_TEST
+
+
+/**
+ * Purpose: Check that limits duration minimum/maximum values are set and get properly.
+ * Cases considered:
+ * - Set and get minimum duration to MIN_DURATION having ticks over MIN_DURATION using time editor object with duration mode.
+ * - Set and get maximum duration to MAX_DURATION having ticks under MAX_DURATION.
+ * using time editor object with duration mode. 359940 seconds are 99:59:00.
+ * - Set and get maximum duration to MIN_DURATION having ticks over MIN_DURATION using time editor object with duration mode.
+ * - Set and get minimum duration to MAX_DURATION having ticks under MAX_DURATION.
+ * using time editor object with duration mode. 359999 seconds are 99:59:59.
+ */
+START_TEST (test_set_duration_min_set_duration_max_limits)
+{
+ guint initial_duration_min;
+ guint duration_min;
+ guint initial_duration_max;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+
+ /* Test 1: Set minimum duration to MAX_DURATION seconds having ticks under MAX_DURATION. */
+ expected_ticks=MIN_DURATION+1;
+ initial_duration_min=MIN_DURATION;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_min!=duration_min) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_min,duration_min,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set maximum duration to MAX_DURATION seconds having ticks under MAX_DURATION. */
+ expected_ticks=MAX_DURATION-59;
+ initial_duration_max=MAX_DURATION;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_max!=duration_max) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_max,duration_max,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set and get maximum duration to MIN_DURATION having ticks over MIN_DURATION
+ using time editor object with duration mode. */
+ expected_ticks=MIN_DURATION+1;
+ initial_duration_max=MIN_DURATION;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_max!=duration_max) | (ticks!=MIN_DURATION),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_max,duration_max,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set and get minimum duration to MIN_DURATION having ticks over MIN_DURATION
+ using time editor object with duration mode. */
+ expected_ticks=MAX_DURATION-1;
+ initial_duration_min=MAX_DURATION;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( initial_duration_min!=duration_min) | (ticks!=MAX_DURATION),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d. Set ticks to %d and result is %d",
+ initial_duration_min,duration_min,ticks,MAX_DURATION);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid minimum/maximum duration values are set and get properly.
+ * Cases considered:
+ * - Set duration_min on NULL object.
+ * - Set and get minimum duration to MAX_DURATION+1 using time editor object with duration mode
+ * setting ticks previously with a value under MAX_DURATION.
+ * - Set and get minimum duration to MAX_DURATION+1 using time editor object with duration mode
+ * setting ticks previously with a value over MAX_DURATION.
+ * - Set duration_max on NULL object.
+ * - Set and get maximum duration to MAX_DURATION+1 using time editor object with duration mode
+ * setting ticks previously with a value under MAX_DURATION.
+ * - Set and get maximum duration to MAX_DURATION+1 using time editor object with duration mode
+ * setting ticks previously with a value over MAX_DURATION.
+ */
+START_TEST (test_set_duration_min_set_duration_max_invalid)
+{
+ guint initial_duration_min;
+ guint expected_duration_min;
+ guint duration_min;
+ guint initial_duration_max;
+ guint expected_duration_max;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+
+ /* Test 1: Set minimum duration on NULL object */
+ hildon_time_editor_set_duration_min(NULL,MIN_DURATION);
+
+ /* Test 2: Set minimum duration to MAX_DURATION+1 seconds to test set_duration_min */
+ initial_duration_min=MAX_DURATION+1;
+ expected_duration_min=MAX_DURATION+1;
+ expected_ticks=MAX_DURATION-1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_duration_min!=duration_min) | (ticks!=MAX_DURATION),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d and result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_min,duration_min,expected_duration_min,expected_ticks,MAX_DURATION,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set minimum duration to MAX_DURATION+1 seconds to test set_duration_min */
+ initial_duration_min=MAX_DURATION+1;
+ expected_duration_min=MAX_DURATION+1;
+ expected_ticks=MAX_DURATION+2;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_min(time_editor,initial_duration_min);
+ duration_min = hildon_time_editor_get_duration_min(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_duration_min!=duration_min) | (ticks!=MAX_DURATION),
+ "hildon-time-editor: set_duration_min or get_duration_min failed with %d. Expected result is %d and result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_min,duration_min,expected_duration_min,expected_ticks,MAX_DURATION,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set maximum duration on NULL object */
+ hildon_time_editor_set_duration_max(NULL,MAX_DURATION);
+
+ /* Test 5: Set maximum duration to MAX_DURATION+1 seconds to test set_duration_max settings ticks under MAX_DURATION*/
+ initial_duration_max=MAX_DURATION+1;
+ expected_duration_max=MAX_DURATION;
+ expected_ticks=MAX_DURATION-59;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if(( expected_duration_max!=duration_max) | (ticks!=expected_ticks),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d and result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_max,duration_max,expected_duration_max,expected_ticks,expected_ticks,ticks);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Initialize values in order to avoid side effects from previous tests */
+ initial_duration_max=MAX_DURATION+1;
+ expected_duration_max=MAX_DURATION;
+ expected_ticks=MAX_DURATION+1;
+
+ /* Test 6: Set maximum duration to MAX_DURATION+1 seconds to test set_duration_max setting ticks over MAX_DURATION */
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_max(time_editor,initial_duration_max);
+ duration_max = hildon_time_editor_get_duration_max(time_editor);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+ fail_if(( expected_duration_max!=duration_max),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d and result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_max,duration_max,expected_duration_max,expected_ticks,MAX_DURATION,ticks);
+
+ /* fail_if(( expected_duration_max!=duration_max) | (ticks!=MAX_DURATION),
+ "hildon-time-editor: set_duration_max or get_duration_max failed with %d. Expected result is %d and result is %d. Set ticks to %d, expected result is %d and result is %d",
+ initial_duration_max,duration_max,expected_duration_max,expected_ticks,MAX_DURATION,ticks);
+ */
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+/* ----- Test case for set_duration_range -----*/
+
+/**
+ * Purpose: Check that regular range values are set and get properly
+ * Cases considered:
+ * - Set and get duration range (100000,200000) having ticks under 100000 using time editor object with duration mode.
+ * - Set and get duration range (100000,200000) having ticks between 100000 and 200000 using time editor object with duration mode.
+ * - Set and get duration range (100000,200000) having ticks over 200000 using time editor object with duration mode.
+ * - Set and get duration range (100000,100000) having ticks under 100000 using time editor object with duration mode.
+ * - Set and get duration range (100000,100000) having ticks equal to 100000 using time editor object with duration mode.
+ * - Set and get duration range (100000,100000) having ticks over 100000 using time editor object with duration mode.
+ *
+ */
+START_TEST (test_set_duration_range_regular)
+{
+ guint initial_duration_min;
+ guint initial_duration_max;
+ guint duration_min;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+ /* Test 1: Set duration range to (100000,200000) seconds to test set_duration_range having ticks under 100000 */
+ initial_duration_min=100000;
+ initial_duration_max=200000;
+ expected_ticks=90000;
+
+ /* Initialize values in order to avoid side effects from previous tests */
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 2: Set duration range to (100000,200000) seconds to test set_duration_range having ticks between 100000 and 200000 */
+ initial_duration_min=100000;
+ initial_duration_max=200000;
+ expected_ticks=150000;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 3: Set duration range to (100000,200000) seconds to test set_duration_range having ticks over 200000*/
+ initial_duration_min=100000;
+ initial_duration_max=200000;
+ expected_ticks=220000;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 4: Set duration range to (100000,100000) seconds to test set_duration_range having ticks under 100000 */
+ initial_duration_min=100000;
+ initial_duration_max=100000;
+ expected_ticks=90000;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 5: Set duration range to (100000,100000) seconds to test set_duration_range having ticks equal to 100000 */
+ initial_duration_min=100000;
+ initial_duration_max=100000;
+ expected_ticks=100000;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set duration range to (100000,100000) seconds to test set_duration_range having ticks over 100000 */
+ initial_duration_min=100000;
+ initial_duration_max=100000;
+ expected_ticks=120000;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limits range values are set and get properly
+ * Cases considered:
+ * - Set and get duration range to (MIN_DURATION,MAX_DURATION) having ticks between MIN_DURATION and MAX_DURATION
+ * using time editor object with duration mode.
+ * - Set and get duration range to (MIN_DURATION,MIN_DURATION) having ticks over MIN_DURATION
+ * using time editor object with duration mode.
+ * - Set and get duration range to (MAX_DURATION,MAX_DURATION) having ticks under MAX_DURATION
+ * using time editor object with duration mode.
+ *
+ */
+START_TEST (test_set_duration_range_limits)
+{
+ guint initial_duration_min;
+ guint initial_duration_max;
+ guint duration_min;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+
+ /* Test 1: Set duration range to (MIN_DURATION,MAX_DURATION) seconds to test set_duration_range having ticks under MIN_DURATION */
+ initial_duration_min=MIN_DURATION;
+ initial_duration_max=MAX_DURATION;
+ expected_ticks=MIN_DURATION+1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ /* Initialize values in order to avoid side effects from previous tests */
+ hildon_time_editor_set_duration_min(time_editor,MIN_DURATION);
+ hildon_time_editor_set_duration_max(time_editor,MAX_DURATION);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 2: Set duration range to (MIN_DURATION,MIN_DURATION) seconds to test set_duration_range having ticks over MIN_DURATION */
+ initial_duration_min=MIN_DURATION;
+ initial_duration_max=MIN_DURATION;
+ expected_ticks=MIN_DURATION+1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set duration range to (MAX_DURATION,MAX_DURATION) seconds to test set_duration_range having ticks under MAX_DURATION */
+ initial_duration_min=MAX_DURATION;
+ initial_duration_max=MAX_DURATION;
+ expected_ticks=MAX_DURATION-1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_min!=duration_min) | (initial_duration_max!=duration_max) | ( ticks!=initial_duration_min )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,initial_duration_max,duration_min,duration_max,ticks,initial_duration_min);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid range values are set and get properly
+ * Cases considered:
+ * - Set duration_range on NULL object.
+ * - Set and get duration range to (MAX_DURATION,MIN_DURATION) using time editor object with duration mode.
+ * - Set and get duration range to (MIN_DURATION,MAX_DURATION+1) having ticks between MIN_DURATION and MAX_DURATION
+ * using time editor object with duration mode.
+ * - Set and get duration range to (MAX_DURATION+1,MIN_DURATION) using time editor object with duration mode.
+ * - Set and get duration range to (MAX_DURATION+1,MAX_DURATION+3)
+ * using time editor object with duration mode.
+ * - Set and get duration range to (MAX_DURATION+3,MAX_DURATION+1)
+ * using time editor object with duration mode.
+ *
+ */
+START_TEST (test_set_duration_range_invalid)
+{
+ guint initial_duration_min;
+ guint initial_duration_max;
+ guint duration_min;
+ guint duration_max;
+ guint expected_ticks;
+ guint ticks;
+ HildonTimeEditor *time_editor = NULL;
+
+
+ /* Test 1: Set duration range on NULL */
+ hildon_time_editor_set_duration_range(NULL,MIN_DURATION,MAX_DURATION);
+
+ /* Test 2: Set duration range to (MAX_DURATION,MIN_DURATION) seconds to test set_duration_range */
+ initial_duration_min=MAX_DURATION;
+ initial_duration_max=MIN_DURATION;
+ expected_ticks=MIN_DURATION+1;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (MIN_DURATION!=duration_min) | (MAX_DURATION!=duration_max) | ( ticks!=MIN_DURATION )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ MIN_DURATION,MAX_DURATION,duration_min,duration_max,ticks,MIN_DURATION);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 3: Set duration range to (MIN_DURATION,MAX_DURATION+1) seconds to test set_duration_range */
+ initial_duration_min=MIN_DURATION;
+ initial_duration_max=MAX_DURATION+1;
+ expected_ticks=MAX_DURATION-59;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (MIN_DURATION!=duration_min) | (MAX_DURATION!=duration_max) | ( ticks!=MIN_DURATION )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ MIN_DURATION,MAX_DURATION,duration_min,duration_max,ticks,MIN_DURATION);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 4: Set duration range to (MAX_DURATION+1,MIN_DURATION) seconds to test set_duration_range */
+ initial_duration_min=MAX_DURATION+1;
+ initial_duration_max=MIN_DURATION;
+ expected_ticks=MIN_DURATION-1;
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+
+ fail_if( ( (MIN_DURATION!=duration_min) | (MAX_DURATION!=duration_max) ),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). ",
+ MIN_DURATION,MAX_DURATION,duration_min,duration_max);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+ /* Test 5: Set duration range to (MAX_DURATION+1,MIN_DURATION+3) seconds to test set_duration_range */
+ initial_duration_min=MAX_DURATION+1;
+ initial_duration_max=MAX_DURATION+3;
+ expected_ticks=MAX_DURATION+1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+/* fail_if( ( (initial_duration_min!=duration_min) | (MAX_DURATION!=duration_max) | ( ticks!=MAX_DURATION )), */
+/* "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ", */
+/* initial_duration_min,MAX_DURATION,duration_min,duration_max,ticks,MAX_DURATION); */
+
+ fail_if( ( (initial_duration_min!=duration_min) | (MAX_DURATION!=duration_max) ),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_min,MAX_DURATION,duration_min,duration_max,ticks,MAX_DURATION);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+ /* Test 6: Set duration range to (MAX_DURATION+3,MIN_DURATION+1) seconds to test set_duration_range */
+ initial_duration_min=MAX_DURATION+3;
+ initial_duration_max=MAX_DURATION+1;
+ expected_ticks=MAX_DURATION+1;
+
+ time_editor = create_and_show_time_editor(showed_window,TRUE,TRUE);
+
+ hildon_time_editor_set_ticks(time_editor,expected_ticks);
+ hildon_time_editor_set_duration_range(time_editor,initial_duration_min,initial_duration_max);
+ hildon_time_editor_get_duration_range(time_editor,&duration_min,&duration_max);
+ ticks = hildon_time_editor_get_ticks(time_editor);
+
+ fail_if( ( (initial_duration_max!=duration_min) | (MAX_DURATION!=duration_max) | ( ticks!=MAX_DURATION )),
+ "hildon-time-editor: set_duration_range or get_duration_range failed with (minimum,maximum) as (%d,%d). Expected range is (%d,%d). Set ticks to %d and expected ticks are %d ",
+ initial_duration_max,MAX_DURATION,duration_min,duration_max,ticks,MAX_DURATION);
+
+ remove_and_destroy_time_editor(showed_window,&time_editor);
+
+
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_time_editor_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonTimeEditor");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_time");
+ TCase *tc2 = tcase_create("set_ticks");
+ TCase *tc3 = tcase_create("set_duration_min_set_duration_max");
+ TCase *tc4 = tcase_create("set_duration_range");
+
+ /* Create test case for hildon_time_editor_set_time and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_time_editor, fx_teardown_default_time_editor);
+ tcase_add_test(tc1, test_set_time_regular);
+ tcase_add_test(tc1, test_set_time_limits);
+ tcase_add_test(tc1, test_set_time_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for hildon_time_editor_set_ticks and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_default_time_editor, fx_teardown_default_time_editor);
+ tcase_add_test(tc2, test_set_ticks_regular);
+ tcase_add_test(tc2, test_set_ticks_limits);
+ tcase_add_test(tc2, test_set_ticks_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Create test case for hildon_time_editor_set_duration_max and add it to the suite */
+ tcase_add_checked_fixture(tc3, fx_setup_default_time_editor, fx_teardown_default_time_editor);
+ tcase_add_test(tc3, test_set_duration_min_set_duration_max_regular);
+ tcase_add_test(tc3, test_set_duration_min_set_duration_max_limits);
+ tcase_add_test(tc3, test_set_duration_min_set_duration_max_invalid);
+ suite_add_tcase (s, tc3);
+
+ /* Create test case for hildon_time_editor_set_duration_range and add it to the suite */
+ tcase_add_checked_fixture(tc4, fx_setup_default_time_editor, fx_teardown_default_time_editor);
+ tcase_add_test(tc4, test_set_duration_range_regular);
+ tcase_add_test(tc4, test_set_duration_range_limits);
+ tcase_add_test(tc4, test_set_duration_range_invalid);
+ suite_add_tcase (s, tc4);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-time-picker.c b/tests/check-hildon-time-picker.c
new file mode 100644
index 0000000..04ca1b9
--- /dev/null
+++ b/tests/check-hildon-time-picker.c
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-window.h"
+#include "hildon-time-picker.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonTimePicker *time_picker = NULL;
+static HildonWindow *tp_window = NULL;
+
+static void
+fx_setup_default_time_picker ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ tp_window = HILDON_WINDOW(hildon_window_new());
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(tp_window),
+ "hildon-time-picker: Window creation failed.");
+
+ time_picker = HILDON_TIME_PICKER(hildon_time_picker_new(GTK_WINDOW(tp_window)));
+
+ /* Check time_picker object has been created properly */
+ fail_if(!HILDON_IS_TIME_PICKER(time_picker),
+ "hildon-time-picker: Creation failed.");
+
+ /* Displays the widget and the window */
+ show_all_test_window (GTK_WIDGET (tp_window));
+ show_all_test_window (GTK_WIDGET (time_picker));
+
+}
+
+static void
+fx_teardown_default_time_picker ()
+{
+ gtk_widget_destroy (GTK_WIDGET (time_picker));
+ gtk_widget_destroy (GTK_WIDGET (tp_window));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_time -----*/
+
+/**
+ * Purpose: Check that regular time values are set and get properly
+ * Cases considered:
+ * - Set and get time to 5h 30m using time picker object.
+ * - Set and get time to 18h 2m using time picker object.
+ */
+START_TEST (test_set_time_regular)
+{
+ guint hours;
+ guint minutes;
+ guint ret_hours;
+ guint ret_minutes;
+
+ /* Check time_picker object has been created properly */
+ fail_if(!HILDON_IS_TIME_PICKER(time_picker),
+ "hildon-time-picker: Creation failed.");
+
+ /* Test 1: Set and get time to 5h 30m using time picker object. */
+ hours = 5;
+ minutes = 30;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+
+ /* Test 2: Set and get time to 18h 2m using time picker object. */
+ hours = 18;
+ minutes = 2;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit time values are set and get properly
+ * Cases considered:
+ * - Set and get time to 0h 0m using time picker object.
+ * - Set and get time to 0h 59m using time picker object.
+ * - Set and get time to 12h 59m using time picker object.
+ * - Set and get time to 23h 59m using time picker object.
+ */
+START_TEST (test_set_time_limits)
+{
+ guint hours;
+ guint minutes;
+ guint ret_hours;
+ guint ret_minutes;
+
+ /* Check time_picker object has been created properly */
+ fail_if(!HILDON_IS_TIME_PICKER(time_picker),
+ "hildon-time-picker: Creation failed.");
+
+ /* Test 1: Set and get time to 0h 0m using time picker object. */
+ hours = 0;
+ minutes = 0;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+
+ /* Test 2: Set and get time to 0h 59m using time picker object. */
+ hours = 0;
+ minutes = 59;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+
+ /* Test 3: Set and get time to 12h 59m using time picker object. */
+ hours = 12;
+ minutes = 59;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+
+ /* Test 4: Set and get time to 23h 59m using time picker object. */
+ hours = 23;
+ minutes = 59;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (hours != ret_hours || minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, ret_hours, ret_minutes);
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit time values are set and get properly
+ * Cases considered:
+ * - Set and get time using NULL time picker.
+ * - Set and get time to 0h 60m using time picker object.
+ * - Set and get time to 24h 0m using time picker object.
+ * - Set and get time to 24h 60m using time picker object.
+ * - Set and get time to 16000h 15533m using time picker object.
+ */
+START_TEST (test_set_time_invalid)
+{
+ guint hours;
+ guint minutes;
+ guint ret_hours;
+ guint ret_minutes;
+ guint expected_hours;
+ guint expected_minutes;
+
+ /* Check time_picker object has been created properly */
+ fail_if(!HILDON_IS_TIME_PICKER(time_picker),
+ "hildon-time-picker: Creation failed.");
+
+ hours = 0;
+ minutes = 60;
+ expected_hours=1;
+ expected_minutes=0;
+
+ /* Test 1: Set and get time using NULL time picker */
+ hildon_time_picker_set_time(NULL,hours,minutes);
+ hildon_time_picker_get_time(NULL,&ret_hours,&ret_minutes);
+
+ /* Test 2: Set and get time to 0h 60m using time picker object. */
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (expected_hours != ret_hours || expected_minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um), expected time is (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, expected_hours, expected_minutes, ret_hours, ret_minutes);
+
+ /* Test 3: Set and get time to 24h 0m using time picker object. */
+ hours = 24;
+ minutes = 0;
+ expected_hours=0;
+ expected_minutes=0;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (expected_hours != ret_hours || expected_minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um), expected time is (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, expected_hours, expected_minutes, ret_hours, ret_minutes);
+
+ /* Test 4: Set and get time to 24h 60m using time picker object. */
+ hours = 24;
+ minutes = 60;
+ expected_hours=1;
+ expected_minutes=0;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (expected_hours != ret_hours || expected_minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um), expected time is (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, expected_hours, expected_minutes, ret_hours, ret_minutes);
+
+ /* Test 5: Set and get time to 16000h 15533m using time picker object.*/
+ hours = 16000;
+ minutes = 15533;
+ expected_hours=10;
+ expected_minutes=53;
+
+ hildon_time_picker_set_time(time_picker,hours,minutes);
+ hildon_time_picker_get_time(time_picker,&ret_hours,&ret_minutes);
+
+ fail_if (expected_hours != ret_hours || expected_minutes != ret_minutes,
+ "hildon-time-picker: Set time (%uh:%um), expected time is (%uh:%um) but returned time is (%uh:%um)",
+ hours, minutes, expected_hours, expected_minutes, ret_hours, ret_minutes);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_time_picker_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonTimePicker");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_time");
+
+ /* Create test case for hildon_time_picker_set_time and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_time_picker, fx_teardown_default_time_picker);
+ tcase_add_test(tc1, test_set_time_regular);
+ tcase_add_test(tc1, test_set_time_limits);
+ tcase_add_test(tc1, test_set_time_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-volumebar-range.c b/tests/check-hildon-volumebar-range.c
new file mode 100644
index 0000000..f784c6b
--- /dev/null
+++ b/tests/check-hildon-volumebar-range.c
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkcontainer.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-volumebar-range.h"
+
+/* Copied from hildon-volumebar-range.h because
+ there is no way to retrieve this values */
+#define VOLUMEBAR_RANGE_INITIAL_VALUE 50.0
+#define VOLUMEBAR_RANGE_MINIMUM_VALUE 0.0
+#define VOLUMEBAR_RANGE_MAXIMUM_VALUE 100.0
+#define CHANGE_THRESHOLD 0.001
+
+/* -------------------- Fixtures -------------------- */
+
+static GtkWidget *showed_window = NULL;
+static HildonVolumebarRange *volumebar_range = NULL;
+
+static void
+fx_setup_default_volumebar_range ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ volumebar_range = HILDON_VOLUMEBAR_RANGE(hildon_volumebar_range_new(GTK_ORIENTATION_VERTICAL));
+
+ showed_window = create_test_window ();
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (volumebar_range));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+ /* Check volumebar range object has been created properly */
+ fail_if(!HILDON_VOLUMEBAR_RANGE(volumebar_range),
+ "hildon-volumebar-range: Creation failed.");
+}
+
+static void
+fx_teardown_default_volumebar_range ()
+{
+
+ /* Destroy the window */
+ gtk_widget_destroy (showed_window);
+}
+
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get_level -----*/
+
+/**
+ * Purpose: Check level usage
+ * Cases considered:
+ * - Set level over the threshold limit
+ * - Set level under the threshold limit.
+ */
+START_TEST (test_set_get_level_regular)
+{
+ gdouble old_level, level, ret_level;
+
+ /* Test1: set level so change is over the threshold limit */
+ level = VOLUMEBAR_RANGE_INITIAL_VALUE + 1.0 + CHANGE_THRESHOLD;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level != level,
+ "hildon-volumebar-range: Set level to %.5f, but get level returned %.5f",
+ level, ret_level);
+
+ /* Test2: set level so change is under the threshold limit */
+ old_level = ret_level;
+ level += (gdouble) (CHANGE_THRESHOLD/2.0);
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level == level,
+ "hildon-volumebar-range: Set level to %.5f when current level is %.5f, but get level returned %.5f",
+ level, old_level, ret_level);
+}
+END_TEST
+
+/**
+ * Purpose: Test handling of limit values
+ * Cases considered:
+ * - Set level to VOLUMEBAR_RANGE_MINIMUM_VALUE
+ * - Set level to VOLUMEBAR_RANGE_MAXIMUM_VALUE
+ */
+START_TEST (test_set_get_level_limits)
+{
+ gdouble level, ret_level;
+
+ /* Test1: Set level to minimum allowed (first set it the a different value) */
+ level = (VOLUMEBAR_RANGE_MINIMUM_VALUE - VOLUMEBAR_RANGE_MINIMUM_VALUE) / 2.0;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ level = VOLUMEBAR_RANGE_MINIMUM_VALUE;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level != level,
+ "hildon-volumebar-range: Set level to %.5f, but get level returned %.5f",
+ level, ret_level);
+
+ /* Test2: Set level to maximum allowed */
+ level = VOLUMEBAR_RANGE_MAXIMUM_VALUE;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level != level,
+ "hildon-volumebar-range: Set level to %.5f, but get level returned %.5f",
+ level, ret_level);
+}
+END_TEST
+
+/**
+ * Purpose: Test handling of invalid values
+ * Cases considered:
+ * - Set level under the minimum value
+ * - Set level over the maximum value
+ * - Set level with NULL object
+ * - Get level with NULL object
+ */
+START_TEST (test_set_get_level_invalid)
+{
+ gdouble level, ret_level;
+
+ /* Test1: Set level under minimum value */
+ level = VOLUMEBAR_RANGE_MINIMUM_VALUE - 1.0 - CHANGE_THRESHOLD;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level != VOLUMEBAR_RANGE_MINIMUM_VALUE,
+ "hildon-volumebar-range: Set level to %.5f (under the minimum allowed), and get level returned %.5f",
+ level, ret_level);
+
+ /* Test2: Set level over maximum value */
+ level = VOLUMEBAR_RANGE_MAXIMUM_VALUE + 1.0 + CHANGE_THRESHOLD;
+ hildon_volumebar_range_set_level(volumebar_range, level);
+ ret_level = hildon_volumebar_range_get_level(volumebar_range);
+ fail_if(ret_level != VOLUMEBAR_RANGE_MAXIMUM_VALUE,
+ "hildon-volumebar-range: Set level to %.5f (greater than maximum allowed), and get level returned %.5f",
+ level, ret_level);
+
+ /* Test3: Set level with NULL object */
+ hildon_volumebar_range_set_level(NULL, level);
+
+ /* Test4: Get level with NULL object */
+ hildon_volumebar_range_get_level(NULL);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_volumebar_range_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonVolumebarRange");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_level");
+
+ /* Create test case for set/get_mute and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_volumebar_range, fx_teardown_default_volumebar_range);
+ tcase_add_test(tc1, test_set_get_level_regular);
+ tcase_add_test(tc1, test_set_get_level_limits);
+ tcase_add_test(tc1, test_set_get_level_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-volumebar.c b/tests/check-hildon-volumebar.c
new file mode 100644
index 0000000..7a76260
--- /dev/null
+++ b/tests/check-hildon-volumebar.c
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-window.h"
+#include "hildon-volumebar.h"
+#include "hildon-hvolumebar.h"
+#include "hildon-vvolumebar.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonVolumebar *volumebar = NULL;
+static HildonWindow *window = NULL;
+
+static void
+fx_setup_hvolumebar ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ volumebar = HILDON_VOLUMEBAR(hildon_hvolumebar_new());
+
+ /* Check volumebar object has been created properly */
+ fail_if(!HILDON_VOLUMEBAR(volumebar),
+ "hildon-volumebar: Creation failed.");
+
+ /* Add volumebar to a window to avoid gtk warnings when
+ trying to set focus to parent window */
+ window = HILDON_WINDOW(hildon_window_new());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(window),
+ "hildon-window: Creation failed.");
+
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(volumebar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (GTK_WIDGET (window));
+}
+
+static void
+fx_setup_vvolumebar ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ volumebar = HILDON_VOLUMEBAR(hildon_vvolumebar_new());
+
+ /* Check volumebar object has been created properly */
+ fail_if(!HILDON_VOLUMEBAR(volumebar),
+ "hildon-volumebar: Creation failed.");
+
+ /* Add volumebar to a window to avoid gtk warnings when
+ trying to set focus to parent window */
+ window = HILDON_WINDOW(hildon_window_new());
+
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(window),
+ "hildon-window: Creation failed.");
+
+ gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(volumebar));
+
+ /* Displays the widget and the window */
+ show_all_test_window (GTK_WIDGET (window));
+}
+
+static void
+fx_teardown_volumebar()
+{
+ gtk_widget_destroy (GTK_WIDGET (window));
+}
+
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get_mute -----*/
+
+/**
+ * Purpose: Check mute usage
+ * Cases considered:
+ * - Set mute ON when volumebar is focusable
+ * - Set mute OFF when volumebar is focusable
+ * - Set mute ON when volumebar is not focusable
+ * - Set mute OFF when volumebar is not focusable
+ */
+START_TEST (test_set_get_mute_regular)
+{
+ gboolean ret_mute;
+ GValue value = {0,};
+
+ /* Test1: Set mute in focusable state */
+ g_value_init(&value, G_TYPE_BOOLEAN);
+ g_value_set_boolean(&value, TRUE);
+ g_object_set_property(G_OBJECT(volumebar), "can-focus", &value);
+ hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumebar), TRUE);
+ ret_mute = hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumebar));
+ fail_if(ret_mute != TRUE,
+ "hildon-volumebar: Set mute to TRUE (volumebar is focusable), but get mute returned FALSE");
+
+ /* Test2: Unset mute in focusable state */
+ hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumebar), FALSE);
+ ret_mute = hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumebar));
+ fail_if(ret_mute != FALSE,
+ "hildon-volumebar: Set mute to FALSE (volumebar is focusable), but get mute returned TRUE");
+
+ /* Test3: Set mute in not focusable state */
+ g_value_set_boolean(&value, FALSE);
+ g_object_set_property(G_OBJECT(volumebar), "can-focus", &value);
+ hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumebar), TRUE);
+ ret_mute = hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumebar));
+ fail_if(ret_mute != TRUE,
+ "hildon-volumebar: Set mute to TRUE (volumebar is not focusable), but get mute returned FALSE");
+
+ /* Test4: Unset mute in not focusable state */
+ hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumebar), FALSE);
+ ret_mute = hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumebar));
+ fail_if(ret_mute != FALSE,
+ "hildon-volumebar: Set mute to FALSE (volumebar is not focusable), but get mute returned TRUE");
+ fail_if(gtk_window_get_focus(GTK_WINDOW(window)) != NULL,
+ "hildon-volumebar: Set mute to FALSE (volumebar is not focusable), but parent window has focused child");
+}
+END_TEST
+
+/**
+ * Purpose: Test handling of invalid values for get/set_mute interface
+ * Cases considered:
+ * - Set mute with NULL volumebar object
+ * - Get mute with NULL volumebar object
+ */
+START_TEST (test_set_get_mute_invalid)
+{
+ /* Check volumebar object has been created properly */
+ fail_if(!HILDON_VOLUMEBAR(volumebar),
+ "hildon-volumebar: Creation failed.");
+
+ /* Test1: Check set mute with NULL volumebar object */
+ hildon_volumebar_set_mute(NULL, FALSE);
+
+ /* Test2: Check get mute with NULL volumebar object */
+ hildon_volumebar_get_mute(NULL);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_volumebar_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonVolumebar");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_mute_hvolumebar");
+ TCase *tc2 = tcase_create("set_get_mute_vvolumebar");
+
+ /* Create test case for set/get_mute (hvolumebar) and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_hvolumebar, fx_teardown_volumebar);
+ tcase_add_test(tc1, test_set_get_mute_regular);
+ tcase_add_test(tc1, test_set_get_mute_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Create test case for set/get_mute (vvolumebar) and add it to the suite */
+ tcase_add_checked_fixture(tc2, fx_setup_vvolumebar, fx_teardown_volumebar);
+ tcase_add_test(tc2, test_set_get_mute_regular);
+ tcase_add_test(tc2, test_set_get_mute_invalid);
+ suite_add_tcase (s, tc2);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check-hildon-weekday-picker.c b/tests/check-hildon-weekday-picker.c
new file mode 100644
index 0000000..43ceba6
--- /dev/null
+++ b/tests/check-hildon-weekday-picker.c
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-weekday-picker.h"
+#include "hildon-window.h"
+#include "hildon-caption.h"
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonWeekdayPicker *weekday_picker = NULL;
+static GtkWidget *showed_window = NULL;
+
+static void
+fx_setup_default_weekday_picker ()
+{
+ int argc = 0;
+
+ gtk_init(&argc, NULL);
+
+ showed_window = create_test_window ();
+
+ weekday_picker = HILDON_WEEKDAY_PICKER(hildon_weekday_picker_new());
+ /* Check weekday_picker object has been created properly */
+ fail_if(!HILDON_IS_WEEKDAY_PICKER(weekday_picker),
+ "hildon-weekday-picker: Creation failed.");
+
+ /* This packs the widget into the window (a gtk container). */
+ gtk_container_add (GTK_CONTAINER (showed_window), GTK_WIDGET (weekday_picker));
+
+ /* Displays the widget and the window */
+ show_all_test_window (showed_window);
+
+
+}
+
+static void
+fx_teardown_default_weekday_picker ()
+{
+ gtk_widget_destroy (GTK_WIDGET (showed_window));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set_day / isset_day -----*/
+
+/**
+ * Purpose: Check that regular day values are set and get properly
+ * Cases considered:
+ * - Set and isset the day "WEDNESDAY" on weekday picker.
+ * - Set and isset two days (WEDNESDAY and SATURDAY) on weekday picker and check that only the two selected days are set.
+ */
+START_TEST (test_set_day_regular)
+{
+
+ /* Test 1: Set WEDNESDAY on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_WEDNESDAY);
+
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY didn't set WEDNESDAY.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set SUNDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY set G_DATE_BAD_WEEKDAY wrong.");
+
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_WEDNESDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_SATURDAY);
+
+ /* Test 1: Set WEDNESDAY and SATURDAY on weekday picker. */
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY didn't set WEDNESDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY didn't set SATURDAY.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set SUNDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_WEDNESDAY and G_DATE_SATURDAY set G_DATE_BAD_WEEKDAY wrong.");
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that limit day values are set and get properly
+ * Cases considered:
+ * - Set and isset the day "MONDAY".
+ * - Set and isset the day "SUNDAY".
+ * - Set SUNDAY and MONDAY on weekday picker and check that the two selected days are set, but the others doesn't be set.
+ * - Set all days on weekday picker and check that all days are set.
+ */
+START_TEST (test_set_day_limits)
+{
+
+ hildon_weekday_picker_unset_all(weekday_picker);
+
+ /* Test 1: Set MONDAY on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_MONDAY);
+
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY didn't set MONDAY.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set SUNDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set G_DATE_BAD_WEEKDAY wrong.");
+
+ hildon_weekday_picker_unset_all(weekday_picker);
+
+ /* Test 2: Set SUNDAY on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_SUNDAY);
+
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_SUNDAY didn't set SUNDAY.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY set G_DATE_BAD_WEEKDAY wrong.");
+
+ hildon_weekday_picker_unset_all(weekday_picker);
+
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_SUNDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_MONDAY);
+
+ /* Test 3: Set MONDAY and SUNDAY on weekday picker. */
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY didn't set MONDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY didn't set SUNDAY.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_MONDAY and G_DATE_SUNDAY set SATURDAY wrong.");
+
+ hildon_weekday_picker_unset_all(weekday_picker);
+
+ /* Test 4: Set all days on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_MONDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_TUESDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_WEDNESDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_THURSDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_FRIDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_SATURDAY);
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_SUNDAY);
+
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day all days did not set MONDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day all days did not set SUNDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day all days did not set TUESDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day all days did not set WEDNESDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day all days did not set THURSDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day all days did not set FRIDAY.");
+ fail_if(!hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day all days did not set SATURDAY.");
+
+}
+END_TEST
+
+/**
+ * Purpose: Check that invalid day values are set and get properly
+ * Cases considered:
+ * - Set MONDAY on NULL weekday picker.
+ * - Set G_DATE_BAD_WEEKDAY on weekday picker.
+ * - Set 8 on weekday picker.
+ * - Set -2 on weekday picker.
+ * - isset_day from NULL weekday picker
+ */
+START_TEST (test_set_day_invalid)
+{
+
+ hildon_weekday_picker_unset_all(weekday_picker);
+
+ /* Test 1: Set MONDAY on NULL weekday picker. */
+ hildon_weekday_picker_set_day(NULL,G_DATE_MONDAY);
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day on NULL object set MONDAY wrong");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day on NULL object set SUNDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day on NULL object set WEDNESDAY wrong.");
+
+ /* Test 2: Set G_DATE_BAD_WEEKDAY on weekday picker. */
+
+ hildon_weekday_picker_set_day(weekday_picker,G_DATE_BAD_WEEKDAY);
+
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set G_DATE_BAD_WEEKDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to G_DATE_BAD_WEEKDAY set SUNDAY wrong.");
+
+ /* Test 3: Set 8 on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,8);
+
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to 8 set G_DATE_BAD_WEEKDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to 8 set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to 8 set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to 8 set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to 8 set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to 8 set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to 8 set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to 8 set SUNDAY wrong.");
+
+ /* Test 4: Set -2 on weekday picker. */
+ hildon_weekday_picker_set_day(weekday_picker,-2);
+
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_BAD_WEEKDAY), "hildon-weekday-picker: set_day/isset_day to -2 set G_DATE_BAD_WEEKDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_MONDAY), "hildon-weekday-picker: set_day/isset_day to -2 set MONDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_TUESDAY), "hildon-weekday-picker: set_day/isset_day to -2 set TUESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_WEDNESDAY), "hildon-weekday-picker: set_day/isset_day to -2 set WEDNESDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_THURSDAY), "hildon-weekday-picker: set_day/isset_day to -2 set THURSDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_FRIDAY), "hildon-weekday-picker: set_day/isset_day to -2 set FRIDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SATURDAY), "hildon-weekday-picker: set_day/isset_day to -2 set SATURDAY wrong.");
+ fail_if(hildon_weekday_picker_isset_day(weekday_picker,G_DATE_SUNDAY), "hildon-weekday-picker: set_day/isset_day to -2 set SUNDAY wrong.");
+
+ /* Test 4: isset_day from NULL weekday picker. */
+ hildon_weekday_picker_isset_day(NULL,G_DATE_BAD_WEEKDAY);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_weekday_picker_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonWeekdayPicker");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_day");
+
+ /* Create test case for hildon_weekday_picker_set_day and hildon_weekday_picker_isset_day and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_weekday_picker, fx_teardown_default_weekday_picker);
+ tcase_add_test(tc1, test_set_day_regular);
+ tcase_add_test(tc1, test_set_day_limits);
+ tcase_add_test(tc1, test_set_day_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-window.c b/tests/check-hildon-window.c
new file mode 100644
index 0000000..dde936f
--- /dev/null
+++ b/tests/check-hildon-window.c
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkentry.h>
+#include <gtk/gtkviewport.h>
+#include <gtk/gtkscrolledwindow.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-window.h"
+
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonWindow *window = NULL;
+
+static void
+fx_setup_default_window ()
+{
+ int argc = 0;
+ gtk_init(&argc, NULL);
+
+ window = HILDON_WINDOW(hildon_window_new());
+ /* Check window object has been created properly */
+ fail_if(!HILDON_IS_WINDOW(window),
+ "hildon-window: Creation failed.");
+
+ show_all_test_window(GTK_WIDGET(window));
+}
+
+static void
+fx_teardown_default_window ()
+{
+ gtk_widget_destroy(GTK_WIDGET(window));
+}
+
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for add_with_scrollbar -----*/
+
+/**
+ * Purpose: Test regular usage
+ * Cases considered:
+ * - Add a non viewport child
+ * - Add a viewport child
+ */
+START_TEST (test_add_with_scrollbar_regular)
+{
+ GtkWidget *box;
+ GtkWidget *scrolled_window;
+ GtkWidget *viewport;
+ GList *children, *first;
+
+ /* Test1: Check addition of a non viewport child */
+ box = gtk_hbox_new(FALSE, 0);
+ hildon_window_add_with_scrollbar(window, box);
+
+ show_all_test_window(GTK_WIDGET(window));
+
+ children = gtk_container_get_children(GTK_CONTAINER(window));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox with scrollbar, but window has not children");
+ fail_if (!GTK_IS_SCROLLED_WINDOW(first->data),
+ "hildon-window: Added a hbox with scrollbar, but retrieved child is not a scrolled window");
+ scrolled_window = GTK_WIDGET(first->data);
+ g_list_free(children);
+ children = gtk_container_get_children(GTK_CONTAINER(scrolled_window));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox with scrollbar, but scrolled window has not children");
+ fail_if (!GTK_IS_VIEWPORT(first->data),
+ "hildon-window: Added a hbox with scrollbar, but retrieved child from the scrolled window is not a viewport");
+ viewport = GTK_WIDGET(first->data);
+ g_list_free(children);
+ children = gtk_container_get_children(GTK_CONTAINER(viewport));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox with scrollbar, but viewport child of the scrolled window has not children");
+ fail_if (!GTK_IS_HBOX(first->data),
+ "hildon-window: Added a hbox with scrollbar, but retrieved child from the viewport of the scrolled window is not a hbox");
+ g_list_free(children);
+ gtk_container_remove(GTK_CONTAINER(window), scrolled_window);
+
+ /* Test2: Check addition of a viewport child */
+ box = gtk_hbox_new(FALSE, 0);
+ viewport = gtk_viewport_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 10, 10, 1000)),
+ GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 10, 10, 1000)));
+ gtk_container_add(GTK_CONTAINER(viewport), box);
+ hildon_window_add_with_scrollbar(window, viewport);
+
+ show_all_test_window(GTK_WIDGET(window));
+
+ children = gtk_container_get_children(GTK_CONTAINER(window));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox inside a viewport with scrollbar, but window has not children");
+ fail_if (!GTK_IS_SCROLLED_WINDOW(first->data),
+ "hildon-window: Added a hbox inside a viewport with scrollbar, but retrieved child is not a scrolled window");
+ scrolled_window = GTK_WIDGET(first->data);
+ g_list_free(children);
+ children = gtk_container_get_children(GTK_CONTAINER(scrolled_window));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox inside a viewportwith scrollbar, but scrolled window has not children");
+ fail_if (!GTK_IS_VIEWPORT(first->data),
+ "hildon-window: Added a hbox inside a viewport with scrollbar, but retrieved child from the scrolled window is not a viewport");
+ viewport = GTK_WIDGET(first->data);
+ g_list_free(children);
+ children = gtk_container_get_children(GTK_CONTAINER(viewport));
+ first = g_list_first(children);
+ fail_if(first == NULL,
+ "hildon-window: Added a hbox inside a viewport with scrollbar, but viewport child of the scrolled window has not children");
+ fail_if (!GTK_IS_HBOX(first->data),
+ "hildon-window: Added a hbox inside a viewport with scrollbar, but retrieved child from the viewport of the scrolled window is not a hbox");
+ g_list_free(children);
+ gtk_container_remove(GTK_CONTAINER(window), scrolled_window);
+}
+END_TEST
+
+/**
+ * Purpose: Check invalid values
+ * Cases considered:
+ * - Add a NULL child
+ * - Add a child to a NULL window
+ * - Add a child with a parent already set
+ */
+START_TEST (test_add_with_scrollbar_invalid)
+{
+ GList *children, *first;
+ GtkWidget *hbox;
+ GtkWidget *entry;
+
+ /* Test1: Add NULL object */
+ hildon_window_add_with_scrollbar(window, NULL);
+ children = gtk_container_get_children(GTK_CONTAINER(window));
+ first = g_list_first(children);
+ fail_if (first != NULL,
+ "hildon-window: Addition of a NULL child is allowed");
+ g_list_free(children);
+
+ /* Test2: Add to a NULL window */
+ hildon_window_add_with_scrollbar(NULL, gtk_hbox_new(FALSE, 0));
+
+ /* Test3: Add a widget with a parent already set */
+ hbox = gtk_hbox_new(FALSE, 0);
+ entry = gtk_entry_new();
+ gtk_container_add(GTK_CONTAINER(hbox), entry);
+ hildon_window_add_with_scrollbar(window, entry);
+
+ show_all_test_window(GTK_WIDGET(window));
+
+ children = gtk_container_get_children(GTK_CONTAINER(window));
+ first = g_list_first(children);
+ fail_if (first != NULL,
+ "hildon-window: Addition of a child with parent already set is allowed");
+ g_list_free(children);
+}
+END_TEST
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_window_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonWindow");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("add_with_scrollbar");
+
+ /* Create test case for add_with_scrollbar and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_window, fx_teardown_default_window);
+ tcase_add_test(tc1, test_add_with_scrollbar_regular);
+ tcase_add_test(tc1, test_add_with_scrollbar_invalid);
+ suite_add_tcase (s, tc1);
+
+ /* Return created suite */
+ return s;
+}
diff --git a/tests/check-hildon-wizard-dialog.c b/tests/check-hildon-wizard-dialog.c
new file mode 100644
index 0000000..d730bc2
--- /dev/null
+++ b/tests/check-hildon-wizard-dialog.c
@@ -0,0 +1,178 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdlib.h>
+#include <check.h>
+#include <gtk/gtkmain.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtklabel.h>
+#include <glib/gprintf.h>
+#include "test_suites.h"
+#include "check_utils.h"
+
+#include "hildon-wizard-dialog.h"
+
+#define DEFAULT_NOTEBOOK_PAGES 3
+
+/* -------------------- Fixtures -------------------- */
+
+static HildonWizardDialog *wizard_dialog = NULL;
+static GtkWindow * showed_window = NULL;
+
+static void
+fx_setup_default_wizard_dialog ()
+{
+ int argc = 0;
+ gint i;
+ GtkNotebook *book;
+ GtkBox *box[DEFAULT_NOTEBOOK_PAGES];
+ GtkLabel *label;
+
+ gtk_init(&argc, NULL);
+
+ showed_window = GTK_WINDOW(create_test_window());
+
+ /* Create a default notebook for the wizard */
+ book = GTK_NOTEBOOK(gtk_notebook_new());
+
+ /* Check notebook object has been created properly */
+ fail_if(!GTK_IS_NOTEBOOK(book),
+ "hildon-wizard-dialog: Auxiliar notebook creation failed.");
+
+ for(i=0; i<DEFAULT_NOTEBOOK_PAGES; i++)
+ {
+ box[i] = GTK_BOX(gtk_vbox_new(FALSE, 0));
+ label = GTK_LABEL(gtk_label_new(g_strdup_printf("Label for page %d", i)));
+ gtk_box_pack_start_defaults(box[i], GTK_WIDGET(label));
+ gtk_notebook_append_page(book, GTK_WIDGET(box[i]), NULL);
+ }
+
+ /* Create the wizard dialog */
+ wizard_dialog = HILDON_WIZARD_DIALOG(hildon_wizard_dialog_new(showed_window, "Wizard test", book));
+
+ show_test_window(GTK_WIDGET(showed_window));
+
+ show_test_window(GTK_WIDGET(wizard_dialog));
+
+ /* Check wizard dialog object has been created properly */
+ fail_if(!HILDON_IS_WIZARD_DIALOG(wizard_dialog),
+ "hildon-wizard-dialog: Creation failed.");
+
+}
+
+static void
+fx_teardown_default_wizard_dialog ()
+{
+ gtk_widget_destroy (GTK_WIDGET(wizard_dialog));
+}
+
+/* -------------------- Test cases -------------------- */
+
+/* ----- Test case for set/get property notebook -----*/
+
+/**
+ * Purpose: Check set and get of property "wizard-notebook"
+ * Cases considered:
+ * - Set and get of a regular notebook.
+ */
+START_TEST (test_set_get_property_wizard_notebook_regular)
+{
+ GtkNotebook *book, *old_book;
+ GValue book_value = {0,};
+ GValue ret_book_value = {0,};
+ gint i;
+ GtkBox *box[2];
+ GtkLabel *label;
+
+ book = GTK_NOTEBOOK(gtk_notebook_new());
+ for(i=0; i<2; i++)
+ {
+ box[i] = GTK_BOX(gtk_vbox_new(FALSE, 0));
+ label = GTK_LABEL(gtk_label_new(g_strdup_printf("Label for page %d", i)));
+ gtk_box_pack_start_defaults(box[i], GTK_WIDGET(label));
+ gtk_notebook_append_page(book, GTK_WIDGET(box[i]), NULL);
+ }
+
+ /* Free the old notebook */
+ g_value_init(&ret_book_value, GTK_TYPE_NOTEBOOK);
+ g_object_get_property(G_OBJECT(wizard_dialog), "wizard-notebook", &ret_book_value);
+ old_book = g_value_get_object (&ret_book_value);
+ gtk_widget_destroy (GTK_WIDGET(old_book));
+
+ g_value_init(&book_value, GTK_TYPE_NOTEBOOK);
+ g_value_set_object(&book_value, book);
+ g_value_reset (&ret_book_value);
+
+ /* Test1: Set and get a regular notebook */
+ /* We don't test dialog title, set during setting of property "wizard-notebook"
+ because it is a visual issue and not a functional one, so it can be changed
+ at any time without breaking any test */
+ g_object_set_property(G_OBJECT(wizard_dialog), "wizard-notebook", &book_value);
+ g_object_get_property(G_OBJECT(wizard_dialog), "wizard-notebook", &ret_book_value);
+ fail_if(g_value_get_object(&ret_book_value) != g_value_get_object(&book_value),
+ "hildon-wizard-dialog: set property \"wizard-notebook\" but get_property returned a different notebook object");
+}
+END_TEST
+
+/**
+ * Purpose: Check set and get of property "wizard-notebook" with
+ * invalid values.
+ * Cases considered:
+ * - Set property to NULL
+ */
+START_TEST (test_set_get_property_wizard_notebook_invalid)
+{
+ GValue book_value = {0,};
+ GValue ret_book_value = {0,};
+
+ /* Test1: set property to NULL */
+ g_value_init(&book_value, GTK_TYPE_NOTEBOOK);
+ g_value_set_object(&book_value, NULL);
+ g_object_set_property(G_OBJECT(wizard_dialog), "wizard-notebook", &book_value);
+ g_object_get_property(G_OBJECT(wizard_dialog), "wizard-notebook", &ret_book_value);
+ fail_if((g_value_get_object(&ret_book_value) != NULL),
+ "hildon-wizard-dialog: Set \"wizard-notebook\" property to NULL is not forbidden");
+}
+END_TEST
+
+
+/* ---------- Suite creation ---------- */
+
+Suite *create_hildon_wizard_dialog_suite()
+{
+ /* Create the suite */
+ Suite *s = suite_create("HildonWizardDialog");
+
+ /* Create test cases */
+ TCase *tc1 = tcase_create("set_get_property_wizard_notebook");
+
+ /* Create test case for property "wizard-notebook" and add it to the suite */
+ tcase_add_checked_fixture(tc1, fx_setup_default_wizard_dialog, fx_teardown_default_wizard_dialog);
+ tcase_add_test(tc1, test_set_get_property_wizard_notebook_regular);
+ tcase_add_test(tc1, test_set_get_property_wizard_notebook_invalid);
+ suite_add_tcase(s, tc1);
+
+ /* Return created suite */
+ return s;
+}
+
+
diff --git a/tests/check_test.c b/tests/check_test.c
new file mode 100644
index 0000000..a1a780f
--- /dev/null
+++ b/tests/check_test.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <X11/Xlibint.h>
+#include <gtk/gtk.h>
+#include <check.h>
+#include <gconf/gconf-client.h>
+
+#include "test_suites.h"
+
+/* Define environment checking results defines */
+#define ENVIRONMENT_X_ERROR 1
+#define ENVIRONMENT_MAEMO_ERROR 2
+#define ENVIRONMENT_OK 3
+
+/* This is used for the Gconf availability check */
+#define GCONF_TEST_PATH "/hildon/tests/flag"
+
+/* ------------------------ Helper functions ------------------------ */
+
+/**
+ * Creates the list of suites to be run.
+ */
+static SRunner *
+configure_tests(gint environment)
+{
+ SRunner *sr;
+
+ /* Create srunner object with the first test suite */
+ sr = srunner_create(create_hildon_range_editor_suite());
+ srunner_add_suite(sr, create_hildon_number_editor_suite());
+ srunner_add_suite(sr, create_hildon_time_editor_suite());
+ srunner_add_suite(sr, create_hildon_time_picker_suite());
+ srunner_add_suite(sr, create_hildon_date_editor_suite());
+ srunner_add_suite(sr, create_hildon_weekday_picker_suite());
+ srunner_add_suite(sr, create_hildon_controlbar_suite());
+ /* srunner_add_suite(sr, create_hildon_color_button_suite()); */
+ /* srunner_add_suite(sr, create_hildon_color_popup_suite()); */
+ srunner_add_suite(sr, create_hildon_seekbar_suite());
+ /* srunner_add_suite(sr, create_hildon_dialoghelp_suite()); */
+ srunner_add_suite(sr, create_hildon_calendar_popup_suite());
+ srunner_add_suite(sr, create_hildon_caption_suite());
+ srunner_add_suite(sr, create_hildon_defines_suite());
+ srunner_add_suite(sr, create_hildon_find_toolbar_suite());
+ /* srunner_add_suite(sr, create_hildon_name_password_dialog_suite());
+ srunner_add_suite(sr, create_hildon_get_password_dialog_suite());
+ srunner_add_suite(sr, create_hildon_set_password_dialog_suite()); */
+ srunner_add_suite(sr, create_hildon_sort_dialog_suite());
+ srunner_add_suite(sr, create_hildon_code_dialog_suite());
+ srunner_add_suite(sr, create_hildon_note_suite());
+ srunner_add_suite(sr, create_hildon_volumebar_suite());
+ srunner_add_suite(sr, create_hildon_volumebar_range_suite());
+ srunner_add_suite(sr, create_hildon_wizard_dialog_suite());
+ /* srunner_add_suite(sr, create_hildon_scroll_area_suite()); */
+ srunner_add_suite(sr, create_hildon_banner_suite());
+ srunner_add_suite(sr, create_hildon_font_selection_dialog_suite());
+ srunner_add_suite(sr, create_hildon_window_suite());
+ srunner_add_suite(sr, create_hildon_composite_widget_suite());
+
+ /* Disable tests that need maemo environment to be up if it is not running */
+ if (environment != ENVIRONMENT_MAEMO_ERROR)
+ {
+ /* srunner_add_suite(sr, create_hildon_system_sound_suite()); */
+ /* srunner_add_suite(sr, create_hildon_color_selector_suite()); */
+ srunner_add_suite(sr, create_hildon_program_suite());
+ }
+
+ return sr;
+}
+
+
+/**
+ * Checks environment configuration for tests execution
+ */
+static gint
+check_environment()
+{
+ Display *display = NULL;
+ GConfClient *client = NULL;
+ GError *gconf_error = NULL;
+
+ /* Check X server availability */
+ if ((display = XOpenDisplay(NULL)) == NULL)
+ return ENVIRONMENT_X_ERROR;
+ else
+ XCloseDisplay(display);
+
+ /* Check maemo environment is up. We do this checking gconf is available */
+ g_type_init();
+ client = gconf_client_get_default();
+ gconf_client_get(client, GCONF_TEST_PATH ,&gconf_error);
+ if (gconf_error)
+ return ENVIRONMENT_MAEMO_ERROR;
+
+ /* Environment is ok */
+ return ENVIRONMENT_OK;
+}
+
+/**
+ * --------------------------------------------------------------------------
+ * Main program
+ * --------------------------------------------------------------------------
+ */
+int main(void)
+{
+ int nf = 0;
+ gint environment = 0;
+
+ /* Show test start header */
+ printf("\n");
+ printf("******************************************************************\n");
+ printf(" Executing hildon-libs unit tests.... \n");
+ printf("******************************************************************\n\n");
+
+ /* Check environment is ok to run the tests */
+ environment = check_environment();
+ if (environment == ENVIRONMENT_X_ERROR)
+ {
+ printf("\n-------------------------- ERROR ------------------------------------");
+ printf("\nNo X server found. Check you have an X server up and running and the");
+ printf("\nDISPLAY environment variable set properly.");
+ printf("\n---------------------------------------------------------------------\n");
+ return EXIT_FAILURE;
+ }
+ else if (environment == ENVIRONMENT_MAEMO_ERROR)
+ {
+ printf("\n------------------------- WARNING -----------------------------------");
+ printf("\nMaemo environment is not running. Some tests that depend on Gconf and");
+ printf("\nDbus will be disabled. To fix this you should startup the environment");
+ printf("\nexecuting \"af-sb-init.sh start\" before running the tests.");
+ printf("\n---------------------------------------------------------------------\n");
+ }
+
+ /* Configure test suites to be executed */
+ SRunner *sr = configure_tests(environment);
+
+ /* Run tests */
+ srunner_run_all(sr, CK_NORMAL);//CK_VERBOSE);
+
+ /* Retrieve number of failed tests */
+ nf = srunner_ntests_failed(sr);
+
+ /* Free resouces */
+ srunner_free(sr);
+
+ /* Return global success or failure */
+ return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/tests/check_utils.c b/tests/check_utils.c
new file mode 100644
index 0000000..408e0ff
--- /dev/null
+++ b/tests/check_utils.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#include <gtk/gtkmain.h>
+
+#include "check_utils.h"
+#include "hildon-window.h"
+
+/**
+ * Creates a window of a fixed, well known size
+ */
+GtkWidget *
+create_test_window ()
+{
+ GtkWidget *window = NULL;
+
+ window = hildon_window_new ();
+ /* gtk_window_resize (GTK_WINDOW (window), TEST_WINDOW_WIDTH, TEST_WINDOW_HEIGHT); */
+
+ return window;
+}
+
+/**
+ * Wrapper to gtk_widget_show, that call to gtk_events_pending serving events.
+ */
+void show_test_window(GtkWidget * window)
+{
+
+ gtk_widget_show (window);
+
+ while (gtk_events_pending ())
+ {
+ gtk_main_iteration ();
+ }
+}
+
+/**
+ * Wrapper to gtk_widget_show_all, that call to gtk_events_pending serving events.
+ */
+void show_all_test_window(GtkWidget * window)
+{
+
+ gtk_widget_show_all (window);
+
+ while (gtk_events_pending ())
+ {
+ gtk_main_iteration ();
+ }
+}
diff --git a/tests/check_utils.h b/tests/check_utils.h
new file mode 100644
index 0000000..40ec15f
--- /dev/null
+++ b/tests/check_utils.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+#ifndef _CHECK_UTILS_H_
+#define _CHECK_UTILS_H_
+
+#include <gtk/gtkwidget.h>
+
+#define TEST_WINDOW_WIDTH 100
+#define TEST_WINDOW_HEIGHT 100
+
+GtkWidget *create_test_window (void);
+void show_test_window (GtkWidget * window);
+void show_all_test_window (GtkWidget * window);
+
+#endif
diff --git a/tests/hildon-clock-widgets_tests.c b/tests/hildon-clock-widgets_tests.c
new file mode 100644
index 0000000..735f891
--- /dev/null
+++ b/tests/hildon-clock-widgets_tests.c
@@ -0,0 +1,714 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+
+#include <gtk/gtk.h>
+
+#include <hildon-widgets/hildon-date-editor.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-calendar-popup.h>
+
+#include <outo.h>
+
+/* Prototypes */
+void init_test (void);
+testcase* get_tests (void);
+
+void init_test (void)
+{
+ int plop = 0;
+ gtk_init (&plop, NULL);
+}
+
+/* time editor: new time: ok parameters */
+static int test01a()
+{
+ HildonTimeEditor *time_editor;
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+ assert(time_editor);
+ return 1;
+}
+
+/* time editor: get time: ok parameters */
+static int test02a()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 99, minutes = 99, seconds = 99;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+ hildon_time_editor_get_time( time_editor, &hours, &minutes, &seconds );
+
+ assert (hours >= 0 && hours < 24);
+ assert (minutes >= 0 && minutes < 60);
+ assert (seconds >= 0 && seconds < 60);
+
+ return 1;
+}
+
+/* time editor: get time: null time editor */
+static int test02b()
+{
+ HildonTimeEditor *time_editor = NULL;
+ guint hours = 99, minutes = 99, seconds = 99;
+
+
+
+ hildon_time_editor_get_time( time_editor, &hours, &minutes, &seconds );
+
+ assert (hours >= 0 && hours < 24);
+ assert (minutes >= 0 && minutes < 60);
+ assert (seconds >= 0 && seconds < 60);
+
+ return 1;
+}
+
+/* time editor: get time: null minutes */
+static int test02c()
+{
+ HildonTimeEditor *time_editor = NULL;
+ guint hours = 99, seconds = 99;
+
+
+
+ hildon_time_editor_get_time (time_editor, &hours, NULL, &seconds);
+
+ return 1;
+}
+
+/* time editor: get time: null hours */
+static int test02d()
+{
+ HildonTimeEditor *time_editor = NULL;
+ guint minutes = 99, seconds = 99;
+
+
+
+ hildon_time_editor_get_time (time_editor, NULL, &minutes, &seconds);
+
+ return 1;
+}
+
+/* time editor: get time: null hours, null minutes, null seconds */
+static int test02e()
+{
+ HildonTimeEditor *time_editor = NULL;
+
+
+
+ hildon_time_editor_get_time (time_editor, NULL, NULL, NULL);
+
+ return 1;
+}
+
+/* time editor: get time: null seconds */
+static int test02f()
+{
+ HildonTimeEditor *time_editor = NULL;
+ guint hours = 99, minutes = 99;;
+
+ init_test();
+
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, NULL);
+
+ return 1;
+}
+
+/* time editor: set time: hours, minutes, seconds are the minimum */
+static int test03a()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 0, minutes = 0, seconds = 0;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 0);
+ assert (minutes == 0);
+ assert (seconds == 0);
+
+ return 1;
+}
+
+/* time editor: set time: ok parameters */
+static int test03b()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 12, minutes = 30, seconds = 30;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 12);
+ assert (minutes == 30);
+ assert (seconds == 30);
+
+ return 1;
+}
+
+/* time editor: set time: hours on limit */
+static int test03c()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 24, minutes = 30, seconds = 0;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 24);
+ assert (minutes == 30);
+ assert (seconds == 0);
+
+
+ return 1;
+}
+
+/* time editor: set time: minutes on limit */
+static int test03d()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 12, minutes = 60, seconds = 0;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 12);
+ assert (minutes == 60);
+ assert (seconds == 0);
+
+
+ return 1;
+}
+
+/* time editor: set time: seconds on limit */
+static int test03da()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 12, minutes = 30, seconds = 60;
+
+ init_test();
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 12);
+ assert (minutes == 30);
+ assert (seconds == 60);
+
+ return 1;
+}
+
+
+/* time editor: set time: hours, minutes on limit */
+static int test03e()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 24, minutes = 60, seconds = 0;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 24);
+ assert (minutes == 60);
+ assert (seconds == 0);
+
+ return 1;
+}
+
+/* time editor: set time: hours, minutes, second on limit */
+static int test03ea()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 24, minutes = 60, seconds = 60;
+
+ init_test();
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert( hours == 24 );
+ assert( minutes == 60 );
+ assert( seconds == 60 );
+
+ return 1;
+}
+
+/* time editor: set time: hours, minutes over max */
+static int test03f()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 25, minutes = 61, seconds = 0;
+
+
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 25);
+ assert (minutes == 61);
+ assert (seconds == 0);
+
+ return 1;
+}
+
+/* time editor: set time: hours, minutes, seconds over max */
+static int test03fa()
+{
+ HildonTimeEditor *time_editor;
+ guint hours = 25, minutes = 61, seconds = 61;
+
+ init_test();
+
+ time_editor = HILDON_TIME_EDITOR(hildon_time_editor_new());
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+ hildon_time_editor_get_time (time_editor, &hours, &minutes, &seconds);
+
+ assert (hours == 25);
+ assert (minutes == 61);
+ assert (seconds == 61);
+
+ return 1;
+}
+
+/* time editor: set time: null time editor*/
+static int test03g()
+{
+ HildonTimeEditor *time_editor = NULL;
+ guint hours = 23, minutes = 59, seconds = 0;
+
+ init_test();
+
+ hildon_time_editor_set_time (time_editor, hours, minutes, seconds);
+
+ return 1;
+}
+
+/* time editor: show seconds: ok parameters */
+static int test03h()
+{
+ HildonTimeEditor *time_editor = NULL;
+
+ init_test();
+
+ time_editor = HILDON_TIME_EDITOR( hildon_time_editor_new () );
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_show_seconds( time_editor, TRUE );
+#else
+ hildon_time_editor_set_show_seconds (time_editor, TRUE);
+#endif
+
+ return 1;
+}
+
+/* time editor: show seconds: null time editor*/
+static int test03i()
+{
+ HildonTimeEditor *time_editor = NULL;
+
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_show_seconds( time_editor, TRUE );
+#else
+ hildon_time_editor_set_show_seconds (time_editor, TRUE);
+#endif
+
+ return 1;
+}
+
+/* time editor: get type: */
+static int test04a()
+{
+ GType t;
+
+
+
+ t = hildon_time_editor_get_type();
+
+ assert (t);
+
+ return 1;
+}
+
+/* date editor: new: ok parameters */
+static int test05a()
+{
+ HildonDateEditor *date_editor;
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+ assert (date_editor);
+ return 1;
+}
+
+/* date editor: get date: ok parameters */
+static int test06a()
+{
+ HildonDateEditor *date_editor;
+ guint year = 99999, month = 99, day = 999;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year > 0);
+ assert (month > 0 && month < 13);
+ assert (day > 0 && day < 32);
+
+ return 1;
+}
+
+/* date editor: get date: null date editor */
+static int test06b()
+{
+ HildonDateEditor *date_editor = NULL;
+ guint year = 99999, month = 99, day = 999;
+
+
+
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year > 0);
+ assert (month > 0 && month < 13);
+ assert (day > 0 && day < 32);
+
+ return 1;
+}
+
+/* date editor: get date: null year */
+static int test06c()
+{
+ HildonDateEditor *date_editor;
+ guint month = 99, day = 999;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_get_date (date_editor, NULL, &month, &day);
+
+ return 1;
+}
+
+/* date editor: get date: null month */
+static int test06d()
+{
+ HildonDateEditor *date_editor;
+ guint month = 99, day = 999;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_get_date (date_editor, &month, NULL, &day);
+
+ return 1;
+}
+
+/* date editor: get date: null day */
+static int test06e()
+{
+ HildonDateEditor *date_editor;
+ guint year = 99999, month = 99;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_get_date (date_editor, &year, &month, NULL);
+
+ return 1;
+}
+
+/* date editor: get date: null year, month, day */
+static int test06f()
+{
+ HildonDateEditor *date_editor;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_get_date (date_editor, NULL, NULL, NULL);
+
+ return 1;
+}
+
+/* date editor: set date: year, month, day are zero */
+static int test07a()
+{
+ HildonDateEditor *date_editor;
+ guint year = 0, month = 0, day = 0;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 0);
+ assert (month == 0);
+ assert (day == 0);
+
+ return 1;
+}
+
+/* date editor: set date: year, month, day are the minumum */
+static int test07ai()
+{
+ HildonDateEditor *date_editor;
+ guint year = 1, month = 1, day = 1;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 1);
+ assert (month == 1);
+ assert (day == 1);
+
+ return 1;
+}
+
+/* date editor: set date: month less than minimum */
+static int test07b()
+{
+ HildonDateEditor *date_editor;
+ guint year = 2003, month = 0, day = 2;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2003);
+ assert (month == 0);
+ assert (day == 2);
+
+ return 1;
+}
+
+/* date editor: set date: day less than minimum */
+static int test07c()
+{
+ HildonDateEditor *date_editor;
+ guint year = 2003, month = 12, day = 0;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2003);
+ assert (month == 12);
+ assert (day == 0);
+
+ return 1;
+}
+
+/* date editor: set date: ok parameters */
+static int test07d()
+{
+ HildonDateEditor *date_editor;
+ guint year = 2003, month = 12, day = 2;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2003);
+ assert (month == 12);
+ assert (day == 2);
+
+ return 1;
+}
+
+/* date editor: set date: big year, should be ok */
+static int test07e()
+{
+ HildonDateEditor *date_editor;
+ /* hmm.. year seems to fail between 2020 and 2030 */
+ guint year = 2500, month = 12, day = 2;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2500);
+ assert (month == 12);
+ assert (day == 2);
+
+ return 1;
+}
+
+/* date editor: set date: month over max */
+static int test07f()
+{
+ HildonDateEditor *date_editor;
+ guint year = 2003, month = 13, day = 2;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2003);
+ assert (month == 13);
+ assert (day == 2);
+
+ return 1;
+}
+
+/* date editor: set date: day over max */
+static int test07g()
+{
+ HildonDateEditor *date_editor;
+ guint year = 2003, month = 11, day = 31;
+
+
+
+ date_editor = HILDON_DATE_EDITOR(hildon_date_editor_new());
+
+ hildon_date_editor_set_date (date_editor, year, month, day);
+ hildon_date_editor_get_date (date_editor, &year, &month, &day);
+
+ assert (year == 2003);
+ assert (month == 11);
+ assert (day == 31);
+
+ return 1;
+}
+
+/* date editor: set date: null date editor */
+static int test07h()
+{
+
+
+ hildon_date_editor_set_date (NULL, 0, 0, 0);
+
+ return 1;
+}
+
+
+testcase tcases[] =
+{
+ {*test01a, " 01a_time_editor_new", EXPECT_OK},
+ {*test02a, " 02a_time_editor_get_time", EXPECT_OK},
+ {*test02b, " 02b_time_editor_get_time_null", EXPECT_ASSERT},
+ {*test02c, " 02c_time_editor_get_time_null2", EXPECT_ASSERT},
+ {*test02d, " 02d_time_editor_get_time_null3", EXPECT_ASSERT},
+ {*test02e, " 02e_time_editor_get_time_null4", EXPECT_ASSERT},
+ {*test02f, " 02e_time_editor_get_time_null5", EXPECT_ASSERT},
+ {*test03a, " 03a_time_editor_set_time_both_0", EXPECT_OK},
+ {*test03b, " 03b_..._both_between", EXPECT_OK},
+ {*test03c, " 03c_..._hours_limit", EXPECT_ASSERT},
+ {*test03d, " 03d_..._minutes_limit", EXPECT_ASSERT},
+ {*test03da," 03d_..._seconds_limit", EXPECT_ASSERT},
+ {*test03e, " 03e_..._both_limit", EXPECT_ASSERT},
+ {*test03ea," 03e_..._all_limit", EXPECT_ASSERT},
+ {*test03f, " 03f_..._both_over", EXPECT_ASSERT},
+ {*test03fa," 03f_..._all_over", EXPECT_ASSERT},
+ {*test03g, " 03g_..._null", EXPECT_ASSERT},
+ {*test03h, " 03h_show_seconds_ok", EXPECT_OK},
+ {*test03i, " 03i_show_seconds_null", EXPECT_ASSERT},
+ {*test04a, " 04a_time_editor_get_type", EXPECT_OK},
+ {*test05a, " 05a_date_editor_new", EXPECT_OK},
+ {*test06a, " 06a_date_editor_get_date", EXPECT_OK},
+ {*test06b, " 06b_date_editor_get_date_null", EXPECT_ASSERT},
+ {*test06c, " 06c_date_editor_get_date_null2", EXPECT_ASSERT},
+ {*test06d, " 06d_date_editor_get_date_null3", EXPECT_ASSERT},
+ {*test06e, " 06e_date_editor_get_date_null4", EXPECT_ASSERT},
+ {*test06f, " 06f_date_editor_get_date_null5", EXPECT_ASSERT},
+ {*test07a, " 07a_date_editor_set_date_valid1", EXPECT_ASSERT},
+ {*test07ai," 07ai_date_editor_set_date_valid1a", EXPECT_OK},
+ {*test07b, " 07b_date_editor_set_date_valid2", EXPECT_ASSERT},
+ {*test07c, " 07c_date_editor_set_date_valid3", EXPECT_ASSERT},
+ {*test07d, " 07d_date_editor_set_date_valid4", EXPECT_OK},
+ {*test07e, " 07e_date_editor_set_date_valid5", EXPECT_OK},
+ {*test07f, " 07f_date_editor_set_date_valid6", EXPECT_ASSERT},
+ {*test07g, " 07g_date_editor_set_date_valid7", EXPECT_ASSERT},
+ {*test07h, " 07h_date_editor_set_date_null", EXPECT_ASSERT},
+
+ {0} /*REMEMBER THE TERMINATING NULL*/
+};
+
+/*use EXPECT_ASSERT for the tests that are _ment_ to throw assert so they are
+ consider passed when they throw assert and failed when tehy do not*/
+
+testcase* get_tests (void)
+{
+ g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+ return tcases;
+}
diff --git a/tests/hildon-widgets_tests.c b/tests/hildon-widgets_tests.c
new file mode 100644
index 0000000..2863703
--- /dev/null
+++ b/tests/hildon-widgets_tests.c
@@ -0,0 +1,3206 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+ * WARNING: outo.sf.net based test cases, mostly outated.
+ *
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+
+#include <gtk/gtk.h>
+
+#include "hildon-controlbar.h"
+#include "hildon-seekbar.h"
+#include "hildon-note.h"
+#include <hildon-widgets/gtk-infoprint.h>
+#include <hildon-widgets/hildon-weekday-picker.h>
+#include <hildon-widgets/hildon-telephone-editor.h>
+#include <hildon-widgets/hildon-range-editor.h>
+#include <hildon-widgets/hildon-sort-dialog.h>
+#include <hildon-widgets/hildon-get-password-dialog.h>
+#include <hildon-widgets/hildon-set-password-dialog.h>
+#include <hildon-widgets/hildon-hvolumebar.h>
+#include <hildon-widgets/hildon-vvolumebar.h>
+#include <hildon-widgets/hildon-font-selection-dialog.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-color-selector.h>
+#include <hildon-widgets/hildon-file-handling-note.h>
+#include <hildon-widgets/hildon-add-home-dialog.h>
+#include <hildon-widgets/hildon-grid-item.h>
+#include <hildon-widgets/hildon-grid.h>
+#include <hildon-widgets/hildon-time-editor.h>
+#include <hildon-widgets/hildon-name-password-dialog.h>
+#include <hildon-widgets/hildon-caption.h>
+#include <outo.h>
+
+/* Icon which must exist (HildonGridItem). */
+#define VALID_ICON "qgn_list_gene_default_app"
+
+/*prototypes to keep the compiler happy*/
+testcase *get_tests(void);
+void init_test(void);
+
+ /* the testfuncs */
+int test1a(void);
+int test1b(void);
+int test1c(void);
+int test1d(void);
+int test1e(void);
+int test1f(void);
+int test1g(void);
+int test1h(void);
+int test1i(void);
+int test2a(void);
+int test2b(void);
+int test2c(void);
+int test2d(void);
+int test2e(void);
+int test3a(void);
+int test3b(void);
+int test3c(void);
+int test3d(void);
+int test3e(void);
+int test3f(void);
+int test3g(void);
+int test3h(void);
+int test3i(void);
+int test3j(void);
+int test3k(void);
+/*int test3l(void);*/
+int test3m(void);
+int test3n(void);
+int test3o(void);
+int test3p(void);
+int test3q(void);
+int test3r(void);
+int test3s(void);
+int test3t(void);
+int test3u(void);
+int test3v(void);
+
+/* notes */
+int test4a(void);
+int test4b(void);
+int test4c(void);
+int test4d(void);
+int test4e(void);
+int test4f(void);
+int test4g(void);
+int test4h(void);
+int test4i(void);
+int test4j(void);
+int test4k(void);
+int test4l(void);
+
+/* volumebar */
+int test6a(void);
+int test6b(void);
+int test6c(void);
+int test6d(void);
+int test6e(void);
+
+int test8a(void);
+int test8b(void);
+int test8c(void);
+int test8d(void);
+int test8e(void);
+int test8f(void);
+int test8g(void);
+int test8h(void);
+int test8i(void);
+int test8j(void);
+int test8k(void);
+
+/* weekday picker */
+int test10a(void);
+int test11a(void);
+int test11b(void);
+int test11c(void);
+int test11d(void);
+int test12a(void);
+int test12b(void);
+int test12c(void);
+
+/* telephone editor */
+int test13a(void);
+int test13b(void);
+int test14a(void);
+int test14b(void);
+int test15a(void);
+int test15b(void);
+int test15c(void);
+int test15d(void);
+int test15e(void);
+int test15f(void);
+int test16a(void);
+int test16b(void);
+int test17a(void);
+int test17b(void);
+int test17c(void);
+int test17d(void);
+int test18a(void);
+int test18b(void);
+int test18c(void);
+int test18d(void);
+int test19a(void);
+int test19b(void);
+int test19c(void);
+int test19d(void);
+int test19e(void);
+
+#if 0
+/* find object dialog */
+int test20a(void);
+int test20b(void);
+int test20c(void);
+int test20d(void);
+#endif
+
+/* find object options dialog */
+/*int test21a(void);
+int test21b(void);
+int test21c(void);
+int test21d(void);
+int test21e(void);
+int test21f(void);
+int test21g(void);
+int test21h(void);
+int test21i(void);
+int test21j(void);*/
+
+/* range editor */
+int test22a(void);
+int test22b(void);
+int test22c(void);
+int test22d(void);
+int test22e(void);
+int test22f(void);
+int test22g(void);
+int test22h(void);
+int test22i(void);
+int test22j(void);
+int test22k(void);
+int test22l(void);
+int test22m(void);
+
+/* sort dialog */
+int test23a(void);
+int test23b(void);
+int test23c(void);
+int test23d(void);
+int test23e(void);
+int test23f(void);
+int test23g(void);
+
+/* get / get old password dialog */
+int test24a(void);
+int test24b(void);
+int test24c(void);
+int test24d(void);
+
+/* set / change password dialog */
+int test25a(void);
+int test25b(void);
+int test25c(void);
+int test25d(void);
+int test25e(void);
+
+/*FontSelectionDialog*/
+#ifndef HILDON_DISABLE_DEPRECATED
+int fsd_set_font(void);
+int fsd_get_font(void);
+#endif
+int fsd_set_pretext(void);
+int fsd_get_pretext(void);
+
+int test27a(void);
+int test27b(void);
+int test27c(void);
+
+/* NumberEditor */
+int test28a(void);
+int test28b(void);
+int test28c(void);
+int test28d(void);
+
+/* ColorSelector */
+int test29a(void);
+int test29b(void);
+
+/* FontHandlingNote */
+int test30a(void);
+int test30b(void);
+int test30c(void);
+int test30d(void);
+
+/* Add to Home / Rename dialog */
+int test31a(void);
+int test31b(void);
+int test32a(void);
+int test32b(void);
+
+/* HildonGridItem */
+int test33a1(void);
+int test33a2(void);
+int test33b1(void);
+int test33b2(void);
+int test33b3(void);
+int test33b4(void);
+int test33c1(void);
+int test33c2(void);
+int test33c3(void);
+int test33c4(void);
+int test33d1(void);
+int test33d2(void);
+int test33d3(void);
+int test33e(void);
+
+/* HildonGrid */
+int test34a(void);
+int test34b1(void);
+int test34b2(void);
+int test34b3(void);
+int test34b4(void);
+int test34c1(void);
+int test34c2(void);
+int test34c3(void);
+int test34d1(void);
+int test34d2(void);
+int test34e1(void);
+int test34e2(void);
+int test34f1(void);
+int test34f2(void);
+int test34f3(void);
+int test34f4(void);
+int test34f5(void);
+int test34g1(void);
+int test34g2(void);
+int test34g3(void);
+int test34g4(void);
+int test34g5(void);
+int test34g6(void);
+int test34h1(void);
+int test34h2(void);
+int test34h3(void);
+int test34h4(void);
+int test34i1(void);
+int test34i2(void);
+int test34j1(void);
+int test34j2(void);
+
+/* Time/Duration Editor */
+int test35a(void);
+int test35b(void);
+int test35c(void);
+int test35d(void);
+int test35e(void);
+int test35f(void);
+int test35g(void);
+int test35h(void);
+
+#if 0
+int test36a(void);
+int test36b(void);
+int test36c(void);
+int test36d(void);
+#endif
+
+/* New infoprint/banner functionalities. */
+int test37a(void);
+int test37b(void);
+int test38a(void);
+
+/* namepassworddialog */
+int test39a(void);
+int test39b(void);
+
+/* file details dialog */
+#ifndef HILDON_DISABLE_DEPRECATED
+int test41a(void);
+#endif
+
+int test42 (void);
+int test43 (void);
+int test44 (void);
+int test45 (void);
+int test46 (void);
+
+/* this has to be like this (not static). outo
+ calls for this! */
+testcase *get_tests(void);
+void init_test( void )
+{
+ int plop = 0;
+ gtk_init (&plop, NULL);
+}
+
+int test1a()
+{
+ HildonControlbar *controlBar;
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+
+ assert(controlBar);
+ return 1;
+}
+
+int test1b()
+{
+ HildonControlbar *controlBar;
+ gint max=500;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_max(controlBar, max);
+ assert(hildon_controlbar_get_max(controlBar) == max);
+ return 1;
+}
+
+int test1c()
+{
+ HildonControlbar *controlBar;
+ gint max=500;
+ gint value=250;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_max(controlBar, max);
+ hildon_controlbar_set_value(controlBar, value);
+ assert(hildon_controlbar_get_value(controlBar) == value);
+ return 1;
+}
+
+int test1d()
+{
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ gtk_widget_destroy(GTK_WIDGET(controlBar));
+ return 1;
+}
+
+int test1e()
+{
+ gint getmin;
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_min(controlBar, 5);
+ getmin = hildon_controlbar_get_min (controlBar);
+ assert (getmin == 5);
+ return 1;
+}
+
+int test1f()
+{
+ gint min = 10;
+ gint max = 50;
+
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_range (controlBar, min, max);
+ return 1;
+}
+
+int test1g()
+{
+ gint minval;
+ gint maxval;
+
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_range (controlBar, 57, 219);
+ minval = hildon_controlbar_get_min (controlBar);
+ maxval = hildon_controlbar_get_max (controlBar);
+ assert (minval == 57);
+ assert (maxval == 219);
+ return 1;
+}
+
+int test1h()
+{
+ gint value;
+
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_range (controlBar, 250, 550);
+ hildon_controlbar_set_value (controlBar, 100);
+
+ value = hildon_controlbar_get_value (controlBar);
+
+ assert (value == 250);
+ return 1;
+}
+
+int test1i()
+{
+ gint value;
+
+ HildonControlbar *controlBar;
+
+ controlBar = HILDON_CONTROLBAR(hildon_controlbar_new());
+ hildon_controlbar_set_range (controlBar, 250, 550);
+ hildon_controlbar_set_value (controlBar, 650);
+
+ value = hildon_controlbar_get_value (controlBar);
+
+ assert (value == 550);
+ return 1;
+}
+
+int test2a()
+{
+ GtkWidget *seekBar;
+
+ seekBar = hildon_seekbar_new();
+ assert(seekBar);
+ return 1;
+}
+
+int test2b()
+{
+ GtkWidget *seekBar;
+ gint totalTime=500;
+
+ seekBar = hildon_seekbar_new();
+ hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+ assert(hildon_seekbar_get_total_time(HILDON_SEEKBAR(seekBar)) == totalTime);
+ return 1;
+}
+
+int test2c()
+{
+ GtkWidget *seekBar;
+ gint totalTime=500;
+ gint position=250;
+
+ seekBar = hildon_seekbar_new();
+ hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+ hildon_seekbar_set_position(HILDON_SEEKBAR(seekBar), position);
+ assert(hildon_seekbar_get_position(HILDON_SEEKBAR(seekBar)) == position);
+ return 1;
+}
+
+int test2d()
+{
+ GtkWidget *seekBar;
+
+ seekBar = hildon_seekbar_new();
+ gtk_widget_destroy(GTK_WIDGET(seekBar));
+ return 1;
+}
+
+int test2e()
+{
+ GtkWidget *seekBar;
+ gint totalTime=500;
+
+ seekBar = hildon_seekbar_new();
+ hildon_seekbar_set_total_time(HILDON_SEEKBAR(seekBar), totalTime);
+ hildon_seekbar_set_fraction(HILDON_SEEKBAR(seekBar), 200);
+ assert(hildon_seekbar_get_fraction(HILDON_SEEKBAR(seekBar)) == 200);
+ return 1;
+}
+
+int test3a()
+{
+
+ gtk_infoprint(NULL,"infoprint");
+ return 1;
+}
+
+int test3b()
+{
+
+ gtk_infoprint(NULL, NULL);
+ return 1;
+}
+
+int test3c()
+{
+
+ gtk_infoprint_with_icon_stock(NULL, "infoprint", GTK_STOCK_DIALOG_QUESTION);
+ return 1;
+}
+
+int test3d()
+{
+
+ gtk_infoprint_with_icon_stock(NULL, "infoprint", "");
+ return 1;
+}
+
+int test3e()
+{
+
+ gtk_infoprint_with_icon_stock(NULL, "infoprint", NULL);
+ return 1;
+}
+
+int test3f()
+{
+
+ gtk_infoprintf (NULL, "mambo %d", 2+3);
+ return 1;
+}
+
+int test3g()
+{
+
+ gtk_infoprintf (NULL, NULL);
+ return 1;
+}
+
+
+int test3h()
+{
+ gtk_confirmation_banner (NULL, "Insert our favourite testing text here.", NULL);
+ return 1;
+}
+
+int test3i()
+{
+ gtk_confirmation_banner (NULL, NULL, NULL);
+ return 1;
+}
+
+int test3j()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+ gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+ gtk_banner_set_text (win, "");
+ gtk_banner_set_text (win, NULL);
+ gtk_banner_close (win);
+ gtk_widget_destroy (GTK_WIDGET (win));
+ return 1;
+}
+
+int test3k()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+ gtk_banner_set_fraction (win, 0.5);
+ gtk_banner_set_fraction (win, -0.5);
+ gtk_banner_set_fraction (win, 1.5);
+ gtk_banner_close (win);
+ gtk_widget_destroy (GTK_WIDGET (win));
+ return 1;
+}
+
+/*int test3l()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+ gtk_banner_close (win);
+ gtk_banner_close (win);
+ gtk_widget_destroy (GTK_WIDGET (win));
+ return 1;
+}*/
+
+int test3m()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_animation (win, "Insert our favourite testing text here.");
+ gtk_widget_destroy (GTK_WIDGET (win));
+ return 1;
+}
+
+int test3n()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+ gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+ gtk_banner_set_text (win, "");
+ gtk_banner_set_text (win, NULL);
+ gtk_banner_set_fraction (win, 0.5);
+ gtk_banner_close (win);
+ return 1;
+}
+
+int test3o()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+ gtk_banner_set_text (win, "Insert our second favourite testing text here.");
+ gtk_banner_set_text (win, "");
+ gtk_banner_set_text (win, NULL);
+ gtk_banner_set_fraction (win, 0.5);
+ gtk_widget_destroy (GTK_WIDGET (win));
+ return 1;
+}
+
+int test3p()
+{
+ gtk_banner_show_bar (NULL, "Insert our favourite testing text here.");
+ gtk_banner_close (NULL);
+ return 1;
+}
+
+int test3q()
+{
+ gtk_banner_set_text (NULL, "Insert our second favourite testing text here.");
+ return 1;
+}
+
+int test3r()
+{
+ gtk_banner_set_fraction (NULL, 0.5);
+ return 1;
+}
+
+int test3s()
+{
+ gtk_banner_close (NULL);
+ return 1;
+}
+
+int test3t()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+ gtk_banner_set_fraction (win, -0.5);
+ gtk_banner_close (win);
+ return 1;
+}
+
+int test3u()
+{
+ GtkWindow *win = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
+ gtk_banner_show_bar (win, "Insert our favourite testing text here.");
+ gtk_banner_set_fraction (win, 1.5);
+ gtk_banner_close (win);
+ return 1;
+}
+
+int test3v()
+{
+ gtk_banner_show_animation (NULL, "Insert our favourite testing text here.");
+ gtk_banner_close (NULL);
+ return 1;
+}
+
+
+/* note: confirmation note */
+int test4a()
+{
+ HildonNote *note = HILDON_NOTE( hildon_note_new_confirmation( NULL,
+ "Delete the presentation?\nHildon Slides" ));
+ assert(note);
+ return 1;
+}
+/* note: confirmation note with icon stock */
+int test4b()
+{
+ HildonNote *note;
+ note = HILDON_NOTE( hildon_note_new_confirmation_with_icon_stock(NULL,
+ "Delete the presentation?\nHildon Slides", GTK_STOCK_OPEN));
+ assert(note);
+ return 1;
+}
+/* note: confirmation note with 10 additional buttons */
+int test4c()
+{
+
+ HildonNote *note = HILDON_NOTE( hildon_note_new_confirmation_add_buttons( NULL,
+ "Delete the presentation?\nHildon Slides",
+ "add 1", 12345, "add 2", 13579,
+ "add 3", 12345, "add 4", 13579,
+ "add 5", 12345, "add 6", 13579,
+ "add 7", 12345, "add 8", 13579,
+ "add 9", 24680, "add 9", 24680, NULL) );
+ assert(note);
+ return 1;
+}
+
+/* note: confirmation note: Set button text*/
+int test4d()
+{
+ HildonNote *note;
+ note = HILDON_NOTE( hildon_note_new_confirmation(NULL,
+ "Delete the presentation?\nHildon Slides"));
+ hildon_note_set_button_text( HILDON_NOTE( note ) , "Remove" );
+ return 1;
+}
+
+/* note: information note */
+int test4e()
+{
+ HildonNote *note;
+ note = HILDON_NOTE( hildon_note_new_information(NULL,
+ "Only one button present\nin this information note"));
+ return 1;
+}
+
+/* note: information note with icon stock */
+int test4f()
+{
+ HildonNote *note;
+ note = HILDON_NOTE( hildon_note_new_information_with_icon_stock(NULL,
+ "Only one button present\nin this information note", GTK_STOCK_HARDDISK));
+ return 1;
+}
+
+/* note: information note: Set button text*/
+int test4g()
+{
+ HildonNote *note;
+ note = HILDON_NOTE( hildon_note_new_information(NULL,
+ "Only one button present\nin this information note"));
+ hildon_note_set_button_text( HILDON_NOTE( note ) , "Continue" );
+ return 1;
+}
+
+/* note: new cancel
+int test4h()
+{
+ HildonNote *note;
+
+ note = HILDON_NOTE( hildon_note_new_cancel( NULL,
+ "Deleting files.." ));
+ assert(note);
+ return 1;
+}*/
+
+/* note: new cancel: set button text
+int test4i()
+{
+ HildonNote *note;
+
+ note = HILDON_NOTE( hildon_note_new_cancel( NULL,
+ "Deleting files.." ));
+ hildon_note_set_button_text( HILDON_NOTE( note ) , "Stop" );
+ return 1;
+}*/
+
+/* note: new cancel with progress bar*/
+int test4j()
+{
+ GtkWidget *progbar;
+ GtkWidget *progress_note;
+
+ progbar = gtk_progress_bar_new();
+
+ gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR( progbar ), 0.7 );
+
+ progress_note = hildon_note_new_cancel_with_progress_bar(
+ NULL, "Deleting files..",
+ GTK_PROGRESS_BAR( progbar ));
+
+ assert(progress_note);
+ return 1;
+}
+
+/* note: new cancel with progress bar: set button text*/
+int test4k()
+{
+ GtkWidget *progbar;
+ GtkWidget *progress_note;
+
+ progbar = gtk_progress_bar_new();
+
+ gtk_progress_bar_set_fraction( GTK_PROGRESS_BAR( progbar ), 0.7 );
+
+ progress_note = hildon_note_new_cancel_with_progress_bar(
+ NULL, "Deleting files..",
+ GTK_PROGRESS_BAR( progbar ));
+
+ hildon_note_set_button_text( HILDON_NOTE( progress_note ) , "Stop" );
+ return 1;
+}
+/* destroy note widgets */
+int test4l()
+{
+ GtkWidget *conf;
+ GtkWidget *inf;
+ /* GtkWidget *cancel;*/
+ GtkWidget *progress;
+ GtkWidget *progbar;
+ GtkWidget *conf_button;
+
+ conf = hildon_note_new_confirmation(NULL, NULL);
+ assert(conf);
+ gtk_widget_destroy(conf);
+
+ inf = hildon_note_new_information(NULL, NULL);
+ assert(inf);
+ gtk_widget_destroy(inf);
+
+ /*
+ cancel = hildon_note_new_cancel( NULL, NULL );
+ assert(cancel);
+ gtk_widget_destroy(cancel);
+ */
+
+ progbar = gtk_progress_bar_new();
+ progress = hildon_note_new_cancel_with_progress_bar(
+ NULL, NULL, GTK_PROGRESS_BAR( progbar ));
+ assert(progress);
+ gtk_widget_destroy(progress);
+
+ conf_button = hildon_note_new_confirmation_add_buttons( NULL, NULL, NULL );
+ assert(conf_button);
+ gtk_widget_destroy(conf_button);
+
+ return 1;
+}
+
+int test6a()
+{
+ HildonHVolumebar *volumeBar;
+
+ volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+ assert(volumeBar);
+ return 1;
+}
+
+int test6b()
+{
+ HildonVVolumebar *volumeBar;
+
+ volumeBar = HILDON_VVOLUMEBAR(hildon_vvolumebar_new());
+ assert(volumeBar);
+ return 1;
+}
+
+int test6c()
+{
+ HildonHVolumebar *volumeBar;
+ gdouble volumeLevel = 0.5;
+
+ volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+ hildon_volumebar_set_level(HILDON_VOLUMEBAR(volumeBar), volumeLevel);
+ assert(hildon_volumebar_get_level(HILDON_VOLUMEBAR(volumeBar)) == volumeLevel);
+ return 1;
+}
+
+int test6d()
+{
+ HildonHVolumebar *volumeBar;
+ gboolean mute = FALSE;
+
+ volumeBar = HILDON_HVOLUMEBAR(hildon_hvolumebar_new());
+ hildon_volumebar_set_mute(HILDON_VOLUMEBAR(volumeBar), mute);
+ assert(hildon_volumebar_get_mute(HILDON_VOLUMEBAR(volumeBar)) == mute);
+ return 1;
+}
+
+int test6e()
+{
+ HildonVVolumebar *volumeBar;
+
+ volumeBar = HILDON_VVOLUMEBAR(hildon_vvolumebar_new());
+ gtk_widget_destroy(GTK_WIDGET(volumeBar));
+ return 1;
+}
+
+/* weekday_picker: new: ok */
+int test10a()
+{
+ GtkWidget *picker;
+
+
+ picker = hildon_weekday_picker_new();
+ assert( picker );
+ return 1;
+}
+
+/* weekday_picker: set/unset/isset: ok */
+int test11a()
+{
+ gint i, j;
+ HildonWeekdayPicker *picker;
+
+
+ picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+ assert( picker );
+
+ /* set all one by one */
+ for( i = 1; i < 8; ++i )
+ hildon_weekday_picker_set_day( picker, i );
+
+ /* check that the proper days are set */
+ for( j = 1; j < 8; ++j )
+ assert( hildon_weekday_picker_isset_day( picker, j ) );
+
+ /* unset all one by one */
+ for( i = 1; i < 8; ++i )
+ hildon_weekday_picker_unset_day( picker, i );
+
+ /* check that the proper days are unset */
+ for( j = 1; j < 8; ++j )
+ assert( !hildon_weekday_picker_isset_day( picker, j ) );
+
+ return 1;
+}
+
+/* weekday_picker: set_day: null */
+int test11b()
+{
+
+ hildon_weekday_picker_set_day( NULL, 0 );
+ return 1;
+}
+
+/* weekday_picker: unset_day: null */
+int test11c()
+{
+
+ hildon_weekday_picker_unset_day( NULL, 0 );
+ return 1;
+}
+
+/* weekday_picker: isset_day: null */
+int test11d()
+{
+
+ hildon_weekday_picker_isset_day( NULL, 0 );
+ return 1;
+}
+
+/* weekday_picker: toggle: ok */
+int test12a()
+{
+ gint i, j;
+ HildonWeekdayPicker *picker;
+
+ picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+ assert( picker );
+
+ /* set all one by one */
+ for( i = 1; i < 8; i++ )
+ hildon_weekday_picker_toggle_day( picker, i );
+
+ /* check that the proper days are set */
+ for( j = 1; j < 8; j++ )
+ assert ( hildon_weekday_picker_isset_day( picker, j ) );
+
+ /* unset all one by one */
+ for( i = 1; i < 8; ++i )
+ hildon_weekday_picker_toggle_day( picker, i );
+
+ /* check that the proper days are unset */
+ for( j = 1; j < 8; ++j )
+ assert( !hildon_weekday_picker_isset_day( picker, j ) );
+
+ return 1;
+}
+
+/* weekday_picker: toggle_day: null */
+int test12b()
+{
+ HildonWeekdayPicker *picker;
+ picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+ hildon_weekday_picker_toggle_day( NULL, 0 );
+ return 1;
+}
+
+/* weekday_picker: set_all/unset_all*/
+int test12c()
+{
+ HildonWeekdayPicker *picker;
+ picker = HILDON_WEEKDAY_PICKER( hildon_weekday_picker_new() );
+ hildon_weekday_picker_set_all( picker );
+ hildon_weekday_picker_unset_all( picker );
+ return 1;
+}
+
+/* telephone editor: new: ok */
+int test13a()
+{
+ GtkWidget *editor;
+
+
+
+ editor = hildon_telephone_editor_new( HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+ assert( editor );
+
+ editor = hildon_telephone_editor_new
+ ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE );
+ assert( editor );
+
+ editor = hildon_telephone_editor_new
+ ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY );
+ assert( editor );
+
+ editor = hildon_telephone_editor_new
+ ( HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA );
+ assert( editor );
+
+ return 1;
+}
+
+/* telephone editor: new: inv */
+int test13b()
+{
+ GtkWidget *editor;
+
+
+
+ editor = hildon_telephone_editor_new( 17 );
+
+ return 1;
+}
+
+
+/* telephone editor: set_editable: ok */
+int test14a()
+{
+ GtkWidget *editor;
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+ hildon_telephone_editor_set_editable( HILDON_TELEPHONE_EDITOR( editor ),
+ TRUE, TRUE, TRUE );
+ hildon_telephone_editor_set_editable( HILDON_TELEPHONE_EDITOR( editor ),
+ FALSE, FALSE, FALSE );
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set_editable: null */
+int test14b()
+{
+
+ hildon_telephone_editor_set_editable( NULL, TRUE, TRUE, TRUE );
+
+ return 1;
+}
+/* telephone editor: set_show_plus: ok */
+int test15a()
+{
+ GtkWidget *editor;
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+
+ assert( editor );
+
+ hildon_telephone_editor_set_show_plus( HILDON_TELEPHONE_EDITOR( editor ),
+ TRUE );
+
+ /* only check if not in free mode (no plus there) */
+ if( i )
+ assert( hildon_telephone_editor_get_show_plus( HILDON_TELEPHONE_EDITOR( editor ) )
+ == TRUE );
+ hildon_telephone_editor_set_show_plus( HILDON_TELEPHONE_EDITOR( editor ),
+ FALSE );
+ if( i )
+ assert( hildon_telephone_editor_get_show_plus( HILDON_TELEPHONE_EDITOR( editor ) )
+ == FALSE );
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set_show_plus: null */
+int test15b()
+{
+
+ hildon_telephone_editor_set_show_plus( NULL, TRUE );
+
+ return 1;
+}
+
+/* telephone editor: get_show_plus: null */
+int test15c()
+{
+
+ hildon_telephone_editor_get_show_plus( NULL );
+
+ return 1;
+}
+
+/* telephone editor: set_show_border: ok */
+int test15d()
+{
+ GtkWidget *editor;
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+
+ assert( editor );
+
+ hildon_telephone_editor_set_show_border( HILDON_TELEPHONE_EDITOR( editor ),
+ TRUE );
+ assert( hildon_telephone_editor_get_show_border
+ ( HILDON_TELEPHONE_EDITOR( editor ) ) == TRUE );
+
+ hildon_telephone_editor_set_show_border( HILDON_TELEPHONE_EDITOR( editor ),
+ FALSE );
+ assert( hildon_telephone_editor_get_show_border( HILDON_TELEPHONE_EDITOR( editor ) )
+ == FALSE );
+
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set_show_border: null */
+int test15e()
+{
+
+ hildon_telephone_editor_set_show_border( NULL, TRUE );
+
+ return 1;
+}
+
+/* telephone editor: get_show_border: null */
+int test15f()
+{
+
+ hildon_telephone_editor_get_show_border( NULL );
+
+ return 1;
+}
+
+/* telephone editor: set_widths: ok */
+int test16a()
+{
+ GtkWidget *editor;
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+ hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+ 0, 0, 0 );
+ hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+ 10, 10, 10 );
+ hildon_telephone_editor_set_widths( HILDON_TELEPHONE_EDITOR( editor ),
+ 100, 100, 100 );
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set_widths: null */
+int test16b()
+{
+
+ hildon_telephone_editor_set_widths( NULL, 1, 1, 1 );
+
+ return 1;
+}
+
+/* telephone editor: set/get_country: ok */
+int test17a()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456";
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+ hildon_telephone_editor_set_country( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_country
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ /* format != FREE */
+ if( i )
+ {
+ g_assert( c );
+ g_assert( strcmp( teststr, c ) == 0 );
+ }
+
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set/get_country: inv */
+int test17b()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456p";
+
+
+
+ editor = hildon_telephone_editor_new(
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY );
+ hildon_telephone_editor_set_country( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_country
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ g_assert( c );
+ g_assert( strcmp( teststr, c ) != 0 );
+
+ gtk_widget_destroy( editor );
+
+ return 1;
+}
+
+/* telephone editor: set_country: null */
+int test17c()
+{
+
+ hildon_telephone_editor_set_country( NULL, "123" );
+
+ return 1;
+}
+
+/* telephone editor: get_country: null */
+int test17d()
+{
+
+ hildon_telephone_editor_get_country( NULL );
+
+ return 1;
+}
+
+/* telephone editor: set/get_area: ok */
+int test18a()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456";
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+ hildon_telephone_editor_set_area( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_area
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ /* format != FREE nor COUNTRY */
+ if( i && i != 2 )
+ {
+ g_assert( c );
+
+ g_assert( strncmp( teststr, c, strlen( c ) ) == 0 );
+ }
+
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set/get_area: inv */
+int test18b()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456p";
+
+
+
+ editor = hildon_telephone_editor_new(
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA );
+ hildon_telephone_editor_set_area( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_area
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ g_assert( c );
+ g_assert( strcmp( teststr, c ) != 0 );
+
+ gtk_widget_destroy( editor );
+
+ return 1;
+}
+
+/* telephone editor: set_area: null */
+int test18c()
+{
+
+ hildon_telephone_editor_set_area( NULL, "123" );
+
+ return 1;
+}
+
+/* telephone editor: get_area: null */
+int test18d()
+{
+
+ hildon_telephone_editor_get_area( NULL );
+
+ return 1;
+}
+
+/* telephone editor: set/get_number: ok */
+int test19a()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456";
+ HildonTelephoneEditorFormat fmt[4] = {
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
+ HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA };
+ gint i;
+
+
+
+ for( i = 0; i < 4; ++i )
+ {
+ editor = hildon_telephone_editor_new( fmt[i] );
+ hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_number
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ /* free != COUNTRY nor AREA */
+ if( i != 2 && i != 3 )
+ {
+ g_assert( c );
+ g_assert( strcmp( teststr, c ) == 0 );
+ }
+
+ gtk_widget_destroy( editor );
+ }
+
+ return 1;
+}
+
+/* telephone editor: set/get_number: ok in FREE format */
+int test19b()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "()+?*pw1234567890";
+
+ editor = hildon_telephone_editor_new(
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+ hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_number
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ g_assert( c );
+ g_assert( strncmp( teststr, c, strlen(c) ) == 0 );
+
+ gtk_widget_destroy( editor );
+
+ return 1;
+}
+
+/* telephone editor: set/get_number: inv */
+int test19c()
+{
+ GtkWidget *editor;
+ const gchar *c;
+ gchar teststr[] = "123456f";
+
+
+
+ editor = hildon_telephone_editor_new(
+ HILDON_TELEPHONE_EDITOR_FORMAT_FREE );
+ hildon_telephone_editor_set_number( HILDON_TELEPHONE_EDITOR( editor ),
+ teststr );
+ c = hildon_telephone_editor_get_number
+ ( HILDON_TELEPHONE_EDITOR( editor ) );
+
+ g_assert( c );
+ g_assert( strcmp( teststr, c ) != 0 );
+
+ gtk_widget_destroy( editor );
+
+ return 1;
+}
+
+/* telephone editor: set_number: null */
+int test19d()
+{
+ hildon_telephone_editor_set_number( NULL, "123" );
+
+ return 1;
+}
+
+/* telephone editor: get_number: null */
+int test19e()
+{
+ hildon_telephone_editor_get_number( NULL );
+
+ return 1;
+}
+
+/* find object options dialog: new */
+/*int test21a(void){
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+ g_assert(dialog);
+ return 1;
+}*/
+
+/* find object options dialog: hide_location */
+/*int test21b(void){
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+ hildon_find_object_options_dialog_hide_location(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+
+ return 1;
+}*/
+
+/* find object options dialog: hide_find_in */
+/*int test21c(void){
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+ hildon_find_object_options_dialog_hide_find_in(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+
+ return 1;
+}*/
+
+/* find object options dialog: get_location */
+/*int test21d(void){
+ const gchar *retString;
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+ retString = hildon_find_object_options_dialog_get_location(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+
+ g_assert(retString);
+
+ return 1;
+}*/
+
+/* find object options dialog: get_find_type */
+/*int test21e(void){
+ HildonFindInType find_type;
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+
+ find_type = hildon_find_object_options_dialog_get_find_type(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+
+ return 1;
+}*/
+
+/* find object options dialog: get_time_period_type */
+/*int test21f(void){
+ HildonTimePeriodType type;
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+ type = hildon_find_object_options_dialog_get_time_period_type(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog));
+ return 1;
+}*/
+
+/* find object options dialog: get_start_date */
+/*int test21g(void){
+ GtkWidget *dialog;
+ gint year, month, day;
+
+ dialog = hildon_find_object_options_dialog_new(NULL);
+
+ hildon_find_object_options_dialog_get_start_date(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog),
+ &year, &month, &day);
+
+ g_assert(year);
+ g_assert(month);
+ g_assert(day);
+
+ return 1;
+}*/
+
+/* find object options dialog: get_end_date */
+/*int test21h(void){
+ GtkWidget *dialog;
+ gint year, month, day;
+
+ dialog = hildon_find_object_options_dialog_new(NULL);
+
+ hildon_find_object_options_dialog_get_end_date(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog),
+ &year, &month, &day);
+
+ g_assert(year);
+ g_assert(month);
+ g_assert(day);
+
+ return 1;
+}*/
+
+/* find object options dialog: add_custom_options */
+/*int test21i(void){
+ GtkWidget *dialog;
+ GtkWidget *widget = gtk_entry_new();
+
+ dialog = hildon_find_object_options_dialog_new(NULL);
+
+ hildon_find_object_options_dialog_add_custom_option(
+ HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog), "New widget", widget);
+
+ return 1;
+}*/
+
+/* find object options dialog: date_matches */
+/*int test21j(void){
+ GtkWidget *dialog;
+ dialog = hildon_find_object_options_dialog_new(NULL);
+
+ g_assert(hildon_find_object_dialog_date_matches(HILDON_FIND_OBJECT_OPTIONS_DIALOG(dialog),
+ 1, 1, 1979));
+
+ return 1;
+}*/
+
+/* range editor: new range editor: ok parameters */
+int test22a()
+{
+ HildonRangeEditor *range_editor;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+ assert(range_editor);
+ return 1;
+}
+
+/* range editor: new range editor with separator: ok parameters */
+int test22b()
+{
+ HildonRangeEditor *range_editor;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new_with_separator(
+ "String"));
+ assert(range_editor);
+ return 1;
+}
+
+/* range editor: new range editor with separator: NULL parameters */
+int test22c()
+{
+ HildonRangeEditor *range_editor;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new_with_separator(NULL));
+ assert(range_editor);
+ return 1;
+}
+
+/* range editor: get range: ok parameters */
+int test22d()
+{
+ HildonRangeEditor *range_editor;
+ gint start, end;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+ hildon_range_editor_get_range (range_editor, &start, &end);
+
+ assert (start == -999);
+ assert (end == 999);
+
+ return 1;
+}
+
+/* range editor: get range: null range editor */
+int test22e()
+{
+ HildonRangeEditor *range_editor = NULL;
+ gint start, end;
+
+ hildon_range_editor_get_range (range_editor, &start, &end);
+
+ return 1;
+}
+
+/* range editor: get range: null end */
+int test22f()
+{
+ HildonRangeEditor *range_editor = NULL;
+ gint start;
+
+ hildon_range_editor_get_range (range_editor, &start, NULL);
+
+ return 1;
+}
+
+/* range editor: get range: null start */
+ int test22g()
+{
+ HildonRangeEditor *range_editor = NULL;
+ gint end;
+
+ hildon_range_editor_get_range (range_editor, NULL, &end);
+
+ return 1;
+}
+
+/* range editor: get range: null start, end */
+int test22h()
+{
+ HildonRangeEditor *range_editor = NULL;
+
+ hildon_range_editor_get_range (range_editor, NULL, NULL);
+
+ return 1;
+}
+
+/* range editor: set range: ok parameters */
+int test22i()
+{
+ HildonRangeEditor *range_editor;
+ gint start = 5, end = 6;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+ hildon_range_editor_set_range (range_editor, start, end);
+ hildon_range_editor_get_range (range_editor, &start, &end);
+
+ assert (start == 5);
+ assert (end == 6);
+
+ return 1;
+}
+
+/* range editor: set range: null range editor*/
+int test22j()
+{
+ HildonRangeEditor *range_editor = NULL;
+ gint start = 5, end = 6;
+
+ hildon_range_editor_set_range (range_editor, start, end);
+
+ return 1;
+}
+
+/* range editor: set limits: ok parameters */
+int test22k()
+{
+ HildonRangeEditor *range_editor;
+ gint start = 0, end = 0;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+ hildon_range_editor_set_limits (range_editor, start, end);
+ hildon_range_editor_get_range (range_editor, &start, &end);
+
+ assert (start == 0);
+ assert (end == 0);
+
+ return 1;
+}
+
+/* range editor: set limits: set range over start minimum and end maximum */
+int test22l()
+{
+ HildonRangeEditor *range_editor;
+ gint start = -1, end = 1;
+
+ range_editor = HILDON_RANGE_EDITOR(hildon_range_editor_new());
+
+ hildon_range_editor_set_limits (range_editor, 0, 0);
+ hildon_range_editor_set_range (range_editor, start, end);
+ hildon_range_editor_get_range (range_editor, &start, &end);
+
+ assert (start == 0);
+ assert (end == 0);
+
+ return 1;
+}
+
+/* range editor: set limits: NULL editor */
+int test22m()
+{
+ HildonRangeEditor *range_editor = NULL;
+ gint start = 0, end = 0;
+
+ hildon_range_editor_set_limits (range_editor, start, end);
+
+ return 1;
+}
+
+
+/* sort dialog: */
+int test23a(void)
+{
+
+ HildonSortDialog *sort_dialog;
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+ assert(sort_dialog);
+ return 1;
+}
+
+/* sort dialog: Get sort key. '0' is the default index value */
+int test23b(void)
+{
+
+ HildonSortDialog *sort_dialog;
+ gint default_key = 0;
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+ assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == default_key );
+ return 1;
+}
+
+/* sort dialog: Set sort key */
+int test23c(void)
+{
+
+ HildonSortDialog *sort_dialog;
+ gint key = 1;
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+ hildon_sort_dialog_set_sort_key( sort_dialog, key );
+ assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == 1 );
+ return 1;
+}
+
+/* sort dialog: add sort key */
+int test23d(void)
+{
+
+ HildonSortDialog *sort_dialog;
+ gint key = 1;
+ gint added_key_index = 0;
+
+ sort_dialog = HILDON_SORT_DIALOG (hildon_sort_dialog_new(NULL));
+ hildon_sort_dialog_add_sort_key (sort_dialog, "Random");
+ added_key_index = hildon_sort_dialog_add_sort_key (sort_dialog,
+ "Date");
+
+ hildon_sort_dialog_set_sort_key( sort_dialog, added_key_index );
+ assert(hildon_sort_dialog_get_sort_key( sort_dialog ) == key );
+ return 1;
+}
+
+/* sort dialog: get sort order. '0' is the default index value */
+int test23e(void)
+{
+
+ HildonSortDialog *sort_dialog;
+ GtkSortType type = 0;
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+ assert(hildon_sort_dialog_get_sort_order( sort_dialog ) == type);
+ return 1;
+}
+
+/* sort dialog: set sort order */
+int test23f(void)
+{
+
+ HildonSortDialog *sort_dialog;
+ GtkSortType type = 1;
+
+ sort_dialog = HILDON_SORT_DIALOG(hildon_sort_dialog_new(NULL));
+ hildon_sort_dialog_set_sort_order( sort_dialog , type);
+ assert(hildon_sort_dialog_get_sort_order( sort_dialog ) == 1);
+ return 1;
+}
+
+/* sort dialog: gtk_widget_destroy */
+int test23g()
+{
+ GtkWidget *sort_dialog;
+
+ sort_dialog = hildon_sort_dialog_new(FALSE);
+ gtk_widget_destroy(GTK_WIDGET(sort_dialog));
+
+ return 1;
+}
+
+/* Get password dialog */
+int test24a(void)
+{
+
+ HildonGetPasswordDialog *get_dialog;
+
+ get_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+ FALSE));
+ assert(get_dialog);
+ return 1;
+}
+
+/* Get Old password dialog */
+int test24b(void)
+{
+
+ HildonGetPasswordDialog *get_old_dialog;
+
+ get_old_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+ TRUE));
+ assert(get_old_dialog);
+ return 1;
+}
+
+/* Get / Get Old password dialog: get password */
+int test24c(void)
+{
+ HildonGetPasswordDialog *get_dialog;
+ HildonGetPasswordDialog *get_old_dialog;
+ const gchar *get_string;
+ const gchar *get_old_string;
+
+ get_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+ FALSE));
+ get_string = hildon_get_password_dialog_get_password( get_dialog);
+ assert(get_string);
+
+ get_old_dialog = HILDON_GET_PASSWORD_DIALOG(hildon_get_password_dialog_new(NULL,
+ TRUE));
+ get_old_string = hildon_get_password_dialog_get_password( get_old_dialog);
+ assert(get_old_string);
+ return 1;
+}
+
+/* get / get old password dialog: gtk_widget_destroy */
+int test24d()
+{
+ GtkWidget *get_dialog;
+ GtkWidget *get_old_dialog;
+
+ get_dialog = hildon_get_password_dialog_new(NULL, FALSE);
+ gtk_widget_destroy(GTK_WIDGET(get_dialog));
+
+ get_old_dialog = hildon_get_password_dialog_new(NULL, TRUE);
+ gtk_widget_destroy(GTK_WIDGET(get_old_dialog));
+
+ return 1;
+}
+
+/* set password dialog */
+int test25a(void)
+{
+
+ HildonSetPasswordDialog *set_dialog;
+
+ set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(NULL,
+ FALSE));
+ assert(set_dialog);
+ return 1;
+}
+
+/* change password dialog */
+int test25b(void)
+{
+
+ HildonSetPasswordDialog *change_dialog;
+
+ change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+ NULL, TRUE));
+ assert(change_dialog);
+ return 1;
+}
+
+/* set / change password dialog: get password */
+int test25c(void)
+{
+ HildonSetPasswordDialog *set_dialog;
+ HildonSetPasswordDialog *change_dialog;
+ const gchar *set_string;
+ const gchar *change_string;
+
+ set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+ NULL, FALSE));
+ set_string = hildon_set_password_dialog_get_password( set_dialog);
+ assert(set_string);
+
+ change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+ NULL, TRUE));
+ change_string = hildon_set_password_dialog_get_password( change_dialog);
+ assert(change_string);
+ return 1;
+}
+
+/* set / change password dialog: get protected */
+int test25d(void)
+{
+ HildonSetPasswordDialog *set_dialog;
+ HildonSetPasswordDialog *change_dialog;
+ gboolean set;
+ gboolean change;
+
+ set_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+ NULL, FALSE));
+ set = hildon_set_password_dialog_get_protected(set_dialog);
+ assert(set);
+
+ change_dialog = HILDON_SET_PASSWORD_DIALOG(hildon_set_password_dialog_new(
+ NULL, TRUE));
+ change = hildon_set_password_dialog_get_protected(change_dialog);
+ assert(change);
+ return 1;
+}
+/* set / change password dialog: gtk_widget_destroy */
+int test25e()
+{
+ GtkWidget *set_dialog;
+ GtkWidget *change_dialog;
+
+ set_dialog = hildon_set_password_dialog_new(NULL, FALSE);
+ gtk_widget_destroy(GTK_WIDGET(set_dialog));
+
+ change_dialog = hildon_set_password_dialog_new(NULL, TRUE);
+ gtk_widget_destroy(GTK_WIDGET(change_dialog));
+
+ return 1;
+}
+
+#ifndef HILDON_DISABLE_DEPRECATED
+int fsd_get_font(void)
+{
+ GtkWidget *fsd;
+ PangoAttrList *list = NULL;
+ fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+ list = hildon_font_selection_dialog_get_font(HILDON_FONT_SELECTION_DIALOG(fsd));
+ assert( list!=NULL );
+ return 1;
+}
+
+int fsd_set_font(void)
+{
+ GtkWidget *fsd;
+ PangoAttrList *list = NULL;
+ fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+ list = hildon_font_selection_dialog_get_font(HILDON_FONT_SELECTION_DIALOG(fsd));
+ hildon_font_selection_dialog_set_font(HILDON_FONT_SELECTION_DIALOG(fsd), list);
+ return 1;
+}
+#endif
+int fsd_set_pretext(void)
+{
+ GtkWidget *fsd;
+ char *str = "Mopo karkas käsistä";
+ fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+ hildon_font_selection_dialog_set_preview_text(HILDON_FONT_SELECTION_DIALOG(fsd),str);
+ return 1;
+}
+
+int fsd_get_pretext(void)
+{
+ GtkWidget *fsd;
+ char *str = NULL;
+ fsd = hildon_font_selection_dialog_new( NULL, "fsd" );
+ str = (char*)hildon_font_selection_dialog_get_preview_text(
+ HILDON_FONT_SELECTION_DIALOG(fsd));
+
+ assert( str!=NULL );
+ return 1;
+}
+
+/* hildon_number_editor_new */
+int test28a(void){
+ GtkWidget *editor;
+ gint min = -120;
+ gint max = 900;
+
+ editor = hildon_number_editor_new (min, max);
+ g_assert(editor);
+
+ return 1;
+}
+
+/* hildon_number_editor_get_value */
+int test28b(void){
+ GtkWidget *editor;
+ gint min = 450;
+ gint max = 7500;
+ gint value;
+
+ editor = hildon_number_editor_new (min, max);
+ value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+ g_assert (value == max);
+
+ return 1;
+}
+
+/* hildon_number_editor_set_range */
+int test28c(void){
+ GtkWidget *editor;
+ gint min = 450;
+ gint max = 7500;
+ gint value;
+
+ editor = hildon_number_editor_new (min, max);
+ hildon_number_editor_set_range (HILDON_NUMBER_EDITOR (editor), 30, 80);
+ value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+ g_assert (value == 80);
+
+ return 1;
+}
+
+/* hildon_number_editor_set_value */
+int test28d(void){
+ GtkWidget *editor;
+ gint min = 450;
+ gint max = 7500;
+ gint value;
+
+ editor = hildon_number_editor_new (min, max);
+ hildon_number_editor_set_value (HILDON_NUMBER_EDITOR (editor), 3450);
+ value = hildon_number_editor_get_value (HILDON_NUMBER_EDITOR(editor));
+ g_assert (value == 3450);
+
+return 1;
+}
+
+/* Hildon-Color-Selector:
+ hildon_color_selector_new()
+ with base color
+ */
+int test29a(void){
+ GtkWidget *colselector;
+ GdkColor redcolor = {0, 65535, 0, 0 };
+ GdkColor *color;
+
+ colselector = hildon_color_selector_new( NULL );
+
+ hildon_color_selector_set_color( HILDON_COLOR_SELECTOR(colselector), &(redcolor) );
+ color = hildon_color_selector_get_color( HILDON_COLOR_SELECTOR(colselector) );
+
+ g_assert( colselector );
+ g_assert( redcolor.pixel == color->pixel );
+ g_assert( redcolor.red == color->red );
+ g_assert( redcolor.green == color->green );
+ g_assert( redcolor.blue == color->blue );
+
+ g_free(color);
+ gtk_widget_destroy ( colselector );
+
+ return 1;
+}
+/* Hildon-Color-Selector:
+ HildonColorSelector with non-base color
+ */
+int test29b(void){
+
+ HildonColorSelector *colorsel;
+ GtkWidget *obj_self;
+ GdkColor mixedcolor = { 0, 7281, 21845, 65535 };
+ GdkColor *color;
+
+ obj_self = hildon_color_selector_new( NULL );
+ colorsel = HILDON_COLOR_SELECTOR ( obj_self );
+
+ hildon_color_selector_set_color( colorsel, &mixedcolor );
+ color = hildon_color_selector_get_color( colorsel );
+
+ g_assert( colorsel );
+ g_assert( color->pixel == 0 );
+ g_assert( color->red == 7281 );
+ g_assert( color->green == 21845 );
+ g_assert( color->blue == 65535 );
+
+ g_free( color );
+ g_object_unref ( obj_self );
+ gtk_widget_destroy( GTK_WIDGET(colorsel) );
+
+ return 1;
+}
+
+/* hildon_file_handling_note_new_moving */
+int test30a(void){
+
+ GtkWidget *file_note;
+
+ file_note = hildon_file_handling_note_new_moving (NULL);
+ hildon_file_handling_note_set_fraction (HILDON_FILE_HANDLING_NOTE(file_note), 0.7);
+
+ g_assert (file_note);
+
+ return 1;
+}
+
+/* hildon_file_handling_note_new_deleting */
+int test30b(void){
+
+ GtkWidget *file_note;
+
+ file_note = hildon_file_handling_note_new_deleting (NULL);
+ hildon_file_handling_note_set_counter_and_name (HILDON_FILE_HANDLING_NOTE (file_note),
+ 1, 2, "bar.txt");
+ hildon_file_handling_note_set_counter_and_name (HILDON_FILE_HANDLING_NOTE (file_note),
+ 2, 2, "foo.txt");
+ g_assert (file_note);
+
+ return 1;
+}
+
+/* hildon_file_handling_note_new_opening */
+int test30c(void){
+
+ GtkWidget *file_note;
+
+ file_note = hildon_file_handling_note_new_opening (NULL);
+ hildon_file_handling_note_set_name (HILDON_FILE_HANDLING_NOTE (file_note),
+ "baz.txt");
+ g_assert (file_note);
+
+ return 1;
+}
+
+/* hildon_file_handling_note_new_saving */
+int test30d(void){
+
+ GtkWidget *file_note;
+
+ file_note = hildon_file_handling_note_new_saving (NULL);
+ hildon_file_handling_note_set_fraction (HILDON_FILE_HANDLING_NOTE (file_note), 0.7);
+ g_assert (file_note);
+
+ return 1;
+}
+
+/* Add to Home dialog new: ok parameters */
+int test31a(void){
+ GtkWidget *d;
+
+ d = hildon_add_home_dialog_new( NULL, "name" , NULL);
+ g_assert( d );
+
+ return 1;
+}
+
+/* Add to Home dialog new: NULL parameter (is ok) */
+int test31b(void){
+ GtkWidget *d;
+
+ d = hildon_add_home_dialog_new( NULL, NULL, NULL );
+ g_assert( d );
+
+ return 1;
+}
+
+/* Rename dialog new: ok parameters */
+int test32a(void){
+ GtkWidget *d;
+
+ d = hildon_add_home_dialog_new( NULL, "name", "newname" );
+ g_assert( d );
+
+ return 1;
+}
+
+/* Rename dialog new: NULL parameter (is ok) */
+int test32b(void){
+ GtkWidget *d;
+
+ d = hildon_add_home_dialog_new( NULL, NULL, "newname" );
+ g_assert( d );
+
+ return 1;
+}
+
+/* Create item with icon basename. */
+int test33a1 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ item = hildon_grid_item_new (VALID_ICON);
+ g_assert (item);
+ return 1;
+}
+
+/* Create item without icon basename. */
+int test33a2 (void)
+{
+ GtkWidget *item;
+ item = hildon_grid_item_new (NULL);
+ g_assert (item);
+ return 1;
+}
+
+/* Create item with icon basename and label. */
+int test33b1 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ item = hildon_grid_item_new_with_label (VALID_ICON, "foo");
+ g_assert (item);
+ return 1;
+}
+
+/* Create item with icon basename but with no label. */
+int test33b2 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ item = hildon_grid_item_new_with_label (VALID_ICON, NULL);
+ g_assert (item);
+ return 1;
+}
+int test33b3 (void)
+{
+ GtkWidget *item;
+ item = hildon_grid_item_new_with_label (NULL, "foo");
+ g_assert (item);
+ return 1;
+}
+
+/* Create item without icon basename and without label. */
+int test33b4 (void)
+{
+ GtkWidget *item;
+ item = hildon_grid_item_new_with_label (NULL, NULL);
+ g_assert (item);
+ return 1;
+}
+
+/* Set emblem type. Non-NULL item, non-NULL emblem. */
+int test33c1 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ item = hildon_grid_item_new (VALID_ICON);
+ hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), VALID_ICON);
+ return 1;
+}
+
+/* Set emblem type. Non-NULL item, NULL emblem. */
+int test33c2 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ item = hildon_grid_item_new (VALID_ICON);
+ hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), NULL);
+ return 1;
+}
+
+/* Set emblem type. NULL item, non-NULL emblem. */
+int test33c3 (void)
+{
+ hildon_grid_item_set_emblem_type (NULL, VALID_ICON);
+ return 1;
+}
+
+/* Set emblem type. NULL item, NULL emblem. */
+int test33c4 (void)
+{
+ hildon_grid_item_set_emblem_type (NULL, NULL);
+ return 1;
+}
+
+/* Get emblem type from existing item - has emblem. */
+int test33d1 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ const gchar *type;
+ item = hildon_grid_item_new (VALID_ICON);
+ hildon_grid_item_set_emblem_type (HILDON_GRID_ITEM (item), VALID_ICON);
+ type = hildon_grid_item_get_emblem_type (HILDON_GRID_ITEM (item));
+ g_assert (type);
+ return 1;
+}
+
+/* Get emblem type from existing item - has no emblem. */
+int test33d2 (void)
+{
+ /* If test fails, first see if icon exists. */
+ GtkWidget *item;
+ const gchar *type;
+ item = hildon_grid_item_new (VALID_ICON);
+ type = hildon_grid_item_get_emblem_type (HILDON_GRID_ITEM (item));
+ g_assert (type != NULL);
+ return 1;
+}
+
+/* Get emblem type from non-existing item. */
+int test33d3 (void)
+{
+ const gchar *type;
+ type = hildon_grid_item_get_emblem_type (NULL);
+ g_assert (type != NULL);
+ return 1;
+}
+
+/* Destroy griditem. */
+int test33e(void)
+{
+ GtkWidget *item;
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_widget_destroy (item);
+ return 1;
+}
+
+/* Create new grid. */
+int test34a (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ g_assert (grid);
+ return 1;
+}
+
+/* Set grid style. */
+int test34b1 (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ hildon_grid_set_style (HILDON_GRID (grid), "bar");
+ return 1;
+}
+
+/* Set grid style (no style). */
+int test34b2 (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ hildon_grid_set_style (HILDON_GRID (grid), NULL);
+ return 1;
+}
+
+/* Set grid style. Invalid grid. */
+int test34b3 (void)
+{
+ hildon_grid_set_style (NULL, "bar");
+ return 1;
+}
+
+/* Set grid style. Invalid grid, no style. */
+int test34b4 (void)
+{
+ hildon_grid_set_style (NULL, NULL);
+ return 1;
+}
+
+/* Get grid style. Valid grid, has style. */
+int test34c1 (void)
+{
+ GtkWidget *grid;
+ const gchar *style;
+ grid = hildon_grid_new ();
+ hildon_grid_set_style (HILDON_GRID (grid), "foo");
+ style = hildon_grid_get_style (HILDON_GRID (grid));
+ g_assert (style);
+ return 1;
+}
+
+/* Get grid style. Valid grid, has no style. */
+int test34c2 (void)
+{
+ GtkWidget *grid;
+ const gchar *style;
+ grid = hildon_grid_new ();
+ hildon_grid_set_style (HILDON_GRID (grid), NULL);
+ style = hildon_grid_get_style (HILDON_GRID (grid));
+ g_assert (style != NULL && strcmp (style, "HildonGrid") == 0);
+ return 1;
+}
+
+/* Get grid style. Invalid grid. */
+int test34c3 (void)
+{
+ const gchar *style;
+ style = hildon_grid_get_style (NULL);
+ g_assert (style);
+ return 1;
+}
+
+/* Set grid scrollbar position. Valid grid. */
+int test34d1 (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ hildon_grid_set_scrollbar_pos (HILDON_GRID (grid), 0);
+ return 1;
+}
+
+/* Set grid scrollbar position. Invalid grid. */
+int test34d2 (void)
+{
+ hildon_grid_set_scrollbar_pos (NULL, 0);
+ return 1;
+}
+
+/* Get grid scrollbar position. Valid grid. */
+int test34e1 (void)
+{
+ GtkWidget *grid;
+ gint pos;
+ grid = hildon_grid_new ();
+ pos = hildon_grid_get_scrollbar_pos (HILDON_GRID (grid));
+ return 1;
+}
+
+/* Get grid scrollbar position. Inalid grid. */
+int test34e2 (void)
+{
+ gint pos;
+ pos = hildon_grid_get_scrollbar_pos (NULL);
+ return 1;
+}
+
+/* Add item to existing grid. */
+int test34f1 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Add NULL to existing grid. */
+int test34f2 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), NULL);
+ return 1;
+}
+
+/* Add something to existing grid. */
+int test34f3 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = gtk_button_new ();
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Add something to non-existing grid. */
+int test34f4 (void)
+{
+ GtkWidget *item;
+ item = gtk_button_new ();
+ gtk_container_add (NULL, item);
+ return 1;
+}
+
+/* Add something to invalid grid. */
+int test34f5 (void)
+{
+ GtkWidget *item;
+ item = gtk_button_new ();
+ gtk_container_add (GTK_CONTAINER (item), item);
+ return 1;
+}
+
+/* Remove item from grid. */
+int test34g1 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_remove (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Remove non-existing item from grid. */
+int test34g2 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_remove (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Remove NULL from grid. */
+int test34g3 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_remove (GTK_CONTAINER (grid), NULL);
+ return 1;
+}
+
+/* Remove something from grid. */
+int test34g4 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = gtk_button_new ();
+ gtk_container_remove (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Remove something from NULL grid. */
+int test34g5 (void)
+{
+ GtkWidget *item;
+ item = gtk_button_new ();
+ gtk_container_remove (NULL, item);
+ return 1;
+}
+
+/* Remove something from invalid grid. */
+int test34g6 (void)
+{
+ GtkWidget *item0, *item1;
+ item0 = gtk_button_new ();
+ item1 = gtk_button_new ();
+ gtk_container_remove (GTK_CONTAINER (item0), item1);
+ return 1;
+}
+
+/* Set focus. */
+int test34h1 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Set focus to non-existing. */
+int test34h2 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Set focus to NULL. */
+int test34h3 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Set focus to something. */
+int test34h4 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = gtk_button_new ();
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ return 1;
+}
+
+/* Get focus. */
+int test34i1 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_container_set_focus_child (GTK_CONTAINER (grid), item);
+ g_assert (GTK_CONTAINER (grid)->focus_child == item);
+ return 1;
+}
+
+/* Get focus (no focused). */
+int test34i2 (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ g_assert (GTK_CONTAINER (grid)->focus_child == NULL);
+ return 1;
+}
+
+/* Destroy grid. Has items. */
+int test34j1 (void)
+{
+ GtkWidget *grid;
+ grid = hildon_grid_new ();
+ gtk_widget_destroy (grid);
+ return 1;
+}
+
+/* Destroy grid. No items. */
+int test34j2 (void)
+{
+ GtkWidget *grid;
+ GtkWidget *item;
+ grid = hildon_grid_new ();
+ item = hildon_grid_item_new (VALID_ICON);
+ gtk_container_add (GTK_CONTAINER (grid), item);
+ gtk_widget_destroy (grid);
+ return 1;
+}
+
+/* HildonTimeEditor: create editor widget */
+int test35a (void){
+ GtkWidget *editor;
+ editor = hildon_time_editor_new ();
+ g_assert (editor);
+ return 1;
+}
+
+/* HildonTimeEditor: set time and check if returned
+ * time value is same
+ */
+int test35b (void){
+ GtkWidget *editor;
+ guint hour, min, sec;
+ editor = hildon_time_editor_new ();
+ hildon_time_editor_set_time (HILDON_TIME_EDITOR (editor),
+ 21, 39, 45);
+ hildon_time_editor_get_time (HILDON_TIME_EDITOR (editor),
+ &hour, &min, &sec);
+ g_assert (hour == 21);
+ g_assert (min == 39);
+ g_assert (sec ==45);
+ return 1;
+}
+
+/* HildonTimeEditor: enable/disable seconds */
+int test35c (void){
+ GtkWidget *editor;
+ editor = hildon_time_editor_new ();
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_show_seconds (HILDON_TIME_EDITOR (editor), 1);
+ hildon_time_editor_show_seconds (HILDON_TIME_EDITOR (editor), 0);
+#else
+ hildon_time_editor_set_show_seconds (HILDON_TIME_EDITOR (editor), 1);
+ hildon_time_editor_set_show_seconds (HILDON_TIME_EDITOR (editor), 0);
+#endif
+ return 1;
+}
+
+/* HildonTimeEditor: enable duration mode */
+int test35d (void){
+ GtkWidget *editor;
+ editor = hildon_time_editor_new ();
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#else
+ hildon_time_editor_set_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#endif
+ return 1;
+}
+
+/* HildonTimeEditor: set duration range and check values
+ * against returned values
+ */
+int test35e (void){
+ GtkWidget *editor;
+ guint min_seconds, max_seconds;
+ editor = hildon_time_editor_new ();
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#else
+ hildon_time_editor_set_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#endif
+ hildon_time_editor_set_duration_range (HILDON_TIME_EDITOR (editor),
+ 3600, 14500);
+ hildon_time_editor_get_duration_range (HILDON_TIME_EDITOR (editor),
+ &min_seconds, &max_seconds);
+ g_assert (min_seconds == 3600);
+ g_assert (max_seconds == 14500);
+ return 1;
+}
+
+/* HildonTimeEditor: enable and disable duration modes */
+int test35f (void){
+ GtkWidget *editor;
+ editor = hildon_time_editor_new ();
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+ hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+ 0);
+#else
+ hildon_time_editor_set_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+ hildon_time_editor_set_duration_mode (HILDON_TIME_EDITOR (editor),
+ 0);
+#endif
+ return 1;
+}
+
+/* HildonTimeEditor: set time and check against
+ * foo values
+ */
+int test35g (void){
+ GtkWidget *editor;
+ guint hour, min, sec;
+ editor = hildon_time_editor_new ();
+ hildon_time_editor_set_time (HILDON_TIME_EDITOR (editor),
+ 21, 39, 45);
+ hildon_time_editor_get_time (HILDON_TIME_EDITOR (editor),
+ &hour, &min, &sec);
+ g_assert (hour == 13);
+ g_assert (min == 33);
+ g_assert (sec ==42);
+ return 1;
+}
+
+/* HildonTimeEditor: set duration range and check values
+ * against foo values
+ */
+int test35h (void){
+ GtkWidget *editor;
+ guint min_seconds, max_seconds;
+ editor = hildon_time_editor_new ();
+#ifndef HILDON_DISABLE_DEPRECATED
+ hildon_time_editor_enable_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#else
+ hildon_time_editor_set_duration_mode (HILDON_TIME_EDITOR (editor),
+ 1);
+#endif
+ hildon_time_editor_set_duration_range (HILDON_TIME_EDITOR (editor),
+ 3600, 14500);
+ hildon_time_editor_get_duration_range (HILDON_TIME_EDITOR (editor),
+ &min_seconds, &max_seconds);
+ g_assert (min_seconds == 4600);
+ g_assert (max_seconds == 15500);
+ return 1;
+}
+
+
+int test37a()
+{
+ gtk_infoprint_temporarily_disable_wrap ();
+ gtk_infoprint (NULL, "A suitably long text for testing the wrapping of gtkinfoprint.");
+ return 1;
+}
+
+int test37b()
+{
+ gtk_banner_temporarily_disable_wrap ();
+ gtk_banner_show_animation (NULL, "A suitably long text for testing the wrapping of gtkinfoprint.");
+ return 1;
+}
+
+int test39a()
+{
+ gchar *name;
+ GtkWidget *dialog;
+
+ dialog = hildon_name_password_dialog_new(NULL);
+ name = (gchar *)hildon_name_password_dialog_get_name(HILDON_NAME_PASSWORD_DIALOG(dialog));
+ g_assert(name);
+
+ return 1;
+}
+
+int test39b()
+{
+ gchar *password;
+ GtkWidget *dialog;
+
+ dialog = hildon_name_password_dialog_new(NULL);
+ password = (gchar *)hildon_name_password_dialog_get_password(HILDON_NAME_PASSWORD_DIALOG(dialog));
+ g_assert(password);
+
+ return 1;
+}
+
+int test42 ()
+{
+ GtkWidget *entry, *caption;
+
+ entry = gtk_entry_new ();
+ caption = hildon_caption_new (NULL /* group */,
+ "caption text",
+ GTK_WIDGET(entry), NULL,
+ HILDON_CAPTION_OPTIONAL /* flag */);
+
+ g_assert (caption);
+ return 1;
+}
+
+int test43 ()
+{
+ GtkWidget *dialog;
+
+ dialog = hildon_get_password_dialog_new (NULL, TRUE);
+ g_assert (dialog);
+
+ dialog = hildon_get_password_dialog_new (NULL, FALSE);
+ g_assert (dialog);
+
+ return 1;
+}
+
+int test44 ()
+{
+ GtkWidget *dialog;
+
+ dialog = hildon_get_password_dialog_new_with_default (NULL, "seekrit",
+ TRUE);
+ g_assert (dialog);
+
+ dialog = hildon_get_password_dialog_new_with_default (NULL, "seekrit",
+ FALSE);
+ g_assert (dialog);
+
+ return 1;
+}
+
+int test45 ()
+{
+ GtkWidget *dialog;
+
+ dialog = hildon_calendar_popup_new (NULL, 1973, 5, 11);
+
+ g_assert (dialog);
+
+ return 1;
+}
+
+int test46 ()
+{
+ GtkWidget *dialog;
+
+ dialog = hildon_add_home_dialog_new (NULL, "oldname", "newname");
+
+ g_assert (dialog);
+
+ dialog = hildon_add_home_dialog_new (NULL, "oldname", NULL);
+
+ g_assert (dialog);
+
+ return 1;
+}
+
+
+testcase tcases[] =
+{
+ {*test1a, "hildon_controlbar_new", EXPECT_OK},
+ {*test1b, "hildon_controlbar_get/set_max", EXPECT_OK},
+ {*test1c, "hildon_controlbar_get/set_value", EXPECT_OK},
+ {*test1d, "gtk_widget_destroy", EXPECT_OK},
+ {*test1e, "hildon_controlbar_get/set_min", EXPECT_OK},
+ {*test1f, "hildon_controlbar_set_range", EXPECT_OK},
+ {*test1g, "hildon_controlbar_set/get_range", EXPECT_OK},
+ {*test1h, "hildon_controlbar_range/set/get_value (min)", EXPECT_OK},
+ {*test1i, "hildon_controlbar_range/set/get_value (max)", EXPECT_OK},
+ {*test2a, "hildon_seekbar_new", EXPECT_OK},
+ {*test2b, "hildon_seekbar_get/set_total_time", EXPECT_OK},
+ {*test2c, "hildon_seekbar_get/set_position", EXPECT_OK},
+ {*test2d, "gtk_widget_destroy", EXPECT_OK},
+ {*test2e, "hildon_seekbat_get/set_fraction", EXPECT_OK},
+ {*test3a, "gtk_infoprint system (something)", EXPECT_OK},
+ {*test3b, "gtk_infoprint system (NULL)", EXPECT_OK},
+ {*test3c, "gtk_infoprint_with_icon_stock (VALID ICON)", EXPECT_OK},
+ {*test3d, "gtk_infoprint_with_icon_stock (EMPTY STRING)", EXPECT_OK},
+ {*test3e, "gtk_infoprint_with_icon_stock (NULL STRING)", EXPECT_OK},
+ {*test3f, "gtk_infoprintf (something)", EXPECT_OK},
+ {*test3g, "gtk_infoprintf (NULL)", EXPECT_OK},
+ {*test3h, "gtk_confirmation_banner (Somestring, NULL STRING)", EXPECT_OK},
+ {*test3i, "gtk_confirmation_banner (Somestring, NULL)", EXPECT_OK},
+ {*test3j, "gtk_banner_show_animation", EXPECT_OK},
+ {*test3k, "gtk_banner_show_animation with set_fraction", EXPECT_OK},
+ /*{*test3l, "gtk_banner_show_animation with two banner_closes", EXPECT_ASSERT},*/
+ {*test3m, "gtk_banner_show_animation with destroy window", EXPECT_OK},
+ {*test3n, "gtk_banner_show_bar", EXPECT_OK},
+ {*test3o, "gtk_banner_show_bar with destroy window", EXPECT_OK},
+ {*test3p, "gtk_banner_show_bar & close with null parent", EXPECT_OK},
+ {*test3q, "gtk_banner_set_text with null parent", EXPECT_OK},
+ {*test3r, "gtk_banner_set_fraction with null parent", EXPECT_OK},
+ {*test3s, "gtk_banner_close with null parent", EXPECT_OK},
+ {*test3t, "gtk_banner_set_fraction with invalid fraction", EXPECT_ASSERT},
+ {*test3u, "gtk_banner_set_fraction with invalid fraction", EXPECT_ASSERT},
+ {*test3v, "gtk_banner_show_animation & close with null parent", EXPECT_OK},
+ {*test4a, "hildon_note_new_confirmation", EXPECT_OK},
+ {*test4b, "hildon_note_new_confirmation_with_icon_stock", EXPECT_OK},
+ {*test4c, "hildon_new_confirmation_add_buttons", EXPECT_OK},
+ {*test4d, ".._new_confirmation: set_button_text", EXPECT_OK},
+ {*test4e, "hildon_note_new_information", EXPECT_OK},
+ {*test4f, "hildon_note_new_information_with_icon_stock", EXPECT_OK},
+ {*test4g, ".._new_information: set_button_text", EXPECT_OK},
+ /* {*test4h, "hildon_note_new_cancel", EXPECT_OK},*/
+ /* {*test4i, ".._new_cancel: set_button_text", EXPECT_OK},*/
+ {*test4j, "hildon_note_new_cancel_with_progress_bar", EXPECT_OK},
+ {*test4k, ".._cancel_with_progress_bar: set_button_text", EXPECT_OK},
+ {*test4l, "destroy note widgets", EXPECT_OK},
+
+ {*test6a, "hildon_volumebar_new (horizontal)", EXPECT_OK},
+ {*test6b, "hildon_volumebar_new (vertical)", EXPECT_OK},
+ {*test6c, "hildon_volumebar_get/set_level", EXPECT_OK},
+ {*test6d, "hildon_volumebar_get/set_mute", EXPECT_OK},
+ {*test6e, "gtk_widget_destroy", EXPECT_OK},
+ {*test10a, "hildon_weekday_picker_new", EXPECT_OK},
+ {*test11a, "hildon_weekday_picker_{,un,is}set", EXPECT_OK},
+ {*test11b, "hildon_weekday_picker_set: null", EXPECT_ASSERT},
+ {*test11c, "hildon_weekday_picker_unset: null", EXPECT_ASSERT},
+ {*test11d, "hildon_weekday_picker_isset: null", EXPECT_ASSERT},
+ {*test12a, "hildon_weekday_picker_toggle_day", EXPECT_OK},
+ {*test12b, "hildon_weekday_picker_toggle_day: null", EXPECT_ASSERT},
+ {*test12c, "hildon_weekday_picker_set_all/unset_all", EXPECT_OK},
+ {*test13a, "htp_editor_new: ok", EXPECT_OK},
+ {*test13b, "htp_editor_new: inv", EXPECT_ASSERT},
+ {*test14a, "htp_editor_set_editable: ok", EXPECT_OK},
+ {*test14b, "htp_editor_set_editable: null", EXPECT_ASSERT},
+ {*test15a, "htp_editor_set_show_plus: ok", EXPECT_OK},
+ {*test15b, "htp_editor_set_show_plus: null", EXPECT_ASSERT},
+ {*test15c, "htp_editor_get_show_plus: null", EXPECT_ASSERT},
+ {*test15d, "htp_editor_set_show_border: ok", EXPECT_OK},
+ {*test15e, "htp_editor_set_show_border: null", EXPECT_ASSERT},
+ {*test15f, "htp_editor_get_show_border: null", EXPECT_ASSERT},
+ {*test16a, "htp_editor_set_widths: ok", EXPECT_OK},
+ {*test16b, "htp_editor_set_widths: null", EXPECT_ASSERT},
+ {*test17a, "htp_editor_set/get_country: ok", EXPECT_OK},
+ {*test17b, "htp_editor_set/get_country: inv", EXPECT_OK},
+ {*test17c, "htp_editor_set_country: null", EXPECT_ASSERT},
+ {*test17d, "htp_editor_get_country: null", EXPECT_ASSERT},
+ {*test18a, "htp_editor_set/get_area: ok", EXPECT_OK},
+ {*test18b, "htp_editor_set/get_area: inv", EXPECT_OK},
+ {*test18c, "htp_editor_set_area: null", EXPECT_ASSERT},
+ {*test18d, "htp_editor_get_area: null", EXPECT_ASSERT},
+ {*test19a, "htp_editor_set/get_number: ok", EXPECT_OK},
+ {*test19b, "htp_editor_set/get_number: FREE", EXPECT_OK},
+ {*test19c, "htp_editor_set/get_number: inv", EXPECT_OK},
+ {*test19d, "htp_editor_set_number: null", EXPECT_ASSERT},
+ {*test19e, "htp_editor_get_number: null", EXPECT_ASSERT},
+#if 0
+ {*test20a, "hildon_find_object: new", EXPECT_OK},
+ {*test20b, "hildon_find_object: with_options", EXPECT_OK},
+ {*test20c, "hildon_find_object: get_text", EXPECT_OK},
+ {*test20d, "hildon_find_object: get_label", EXPECT_OK},
+#endif
+ /*{*test21a, "hildon_find_options: new", EXPECT_OK},
+ {*test21b, "hildon_find_options: hide_loc", EXPECT_OK},
+ {*test21c, "hildon_find_options: hide_find_in", EXPECT_OK},
+ {*test21d, "hildon_find_options: get_location", EXPECT_OK},
+ {*test21e, "hildon_find_options: get_find", EXPECT_OK},
+ {*test21f, "hildon_find_options: get_time_period", EXPECT_OK},
+ {*test21g, "hildon_find_options: get_start", EXPECT_OK},
+ {*test21h, "hildon_find_options: get_end", EXPECT_OK},
+ {*test21i, "hildon_find_options: add_custom", EXPECT_OK},
+ {*test21j, "hildon_find_options: date_matches", EXPECT_ASSERT},*/
+ {*test22a, "range_editor_new", EXPECT_OK},
+ {*test22b, "range_editor_new_with_separator", EXPECT_OK},
+ {*test22c, "range_editor_new_with_separator_null", EXPECT_OK},
+ {*test22d, "hildon_range_editor_get_range", EXPECT_OK},
+ {*test22e, "hildon_range_editor_get_range_null", EXPECT_ASSERT},
+ {*test22f, "hildon_range_editor_get_range_null2", EXPECT_ASSERT},
+ {*test22g, "hildon_range_editor_get_range_null3", EXPECT_ASSERT},
+ {*test22h, "hildon_range_editor_get_range_null4", EXPECT_ASSERT},
+ {*test22i, "hildon_range_editor_set_range", EXPECT_OK},
+ {*test22j, "hildon_range_editor_set_range_null_editor", EXPECT_ASSERT},
+ {*test22k, "hildon_range_editor_set_limits", EXPECT_OK},
+ {*test22l, "hildon_range_editor_set_limits&range", EXPECT_OK},
+ {*test22m, "hildon_range_editor_set_limits_null", EXPECT_ASSERT},
+ {*test23a, "hildon_sort_dialog_new", EXPECT_OK},
+ {*test23b, "hildon_sort_dialog_get_sort_key", EXPECT_OK},
+ {*test23c, "hildon_sort_dialog_set_sort_key", EXPECT_OK},
+ {*test23d, "hildon_sort_dialog_add_sort_key", EXPECT_OK},
+ {*test23e, "hildon_sort_dialog_get_sort_order", EXPECT_OK},
+ {*test23f, "hildon_sort_dialog_set_sort_order", EXPECT_OK},
+ {*test23g, "gtk_widget_destroy", EXPECT_OK},
+ {*test24a, "get_password_dialog. get dialog", EXPECT_OK},
+ {*test24b, "get_password_dialog. get old dialog", EXPECT_OK},
+ {*test24c, "get_password_dialog_new_get_password", EXPECT_OK},
+ {*test24d, "gtk_widget_destroy", EXPECT_OK},
+ {*test25a, "set_password_dialog. set dialog ", EXPECT_OK},
+ {*test25b, "set_password_dialog. change dialog", EXPECT_OK},
+ {*test25c, "set_password_dialog_new_get_password", EXPECT_OK},
+ {*test25d, "set_password_dialog_new_get_protected", EXPECT_ASSERT},
+ {*test25e, "gtk_widget_destroy", EXPECT_OK},
+#ifndef HILDON_DISABLE_DEPRECATED
+ {*fsd_set_font, "FontSelectionDialog Set font", EXPECT_OK},
+ {*fsd_get_font,"FontSelectionDialog Get font", EXPECT_OK},
+#endif
+ {*fsd_set_pretext, "FontSelectionDialog Set preview text", EXPECT_OK},
+ {*fsd_get_pretext, "FontSelectionDialog Get preview text", EXPECT_OK},
+ {*test28a, "hildon_number_editor_new", EXPECT_OK},
+ {*test28b, "hildon_number_editor_get_value", EXPECT_OK},
+ {*test28c, "hildon_number_editor_set_range", EXPECT_OK},
+ {*test28d, "hildon_number_editor_set_value", EXPECT_OK},
+ {*test29a, "hildon_color_selector: set and get red color", EXPECT_OK},
+ {*test29b, "hildon_color_selector: set and get non-base color", EXPECT_ASSERT},
+ {*test30a, "hildon_file_handling_note_new_moving", EXPECT_OK},
+ {*test30b, "hildon_file_handling_note_new_deleting", EXPECT_OK},
+ {*test30c, "hildon_file_handling_note_new_opening", EXPECT_OK},
+ {*test30d, "hildon_file_handling_note_new_saving", EXPECT_OK},
+ {*test31a, "hildon_add_home_dialog_new: ok", EXPECT_OK},
+ {*test31b, "hildon_add_home_dialog_new: NULL(ok)", EXPECT_OK},
+ {*test32a, "hildon_rename_dialog: ok", EXPECT_OK},
+ {*test32b, "hildon_rename_dialog: NULL(ok)", EXPECT_OK},
+ {*test33a1, "grid_item_new (\"foo\")", EXPECT_OK},
+ {*test33a2, "grid_item_new (NULL)", EXPECT_OK},
+ {*test33b1, "grid_item_new_label (\"foo\", \"bar\")", EXPECT_OK},
+ {*test33b2, "grid_item_new_label (\"foo\", NULL)", EXPECT_OK},
+ {*test33b3, "grid_item_new_label (NULL, \"bar\")", EXPECT_OK},
+ {*test33b4, "grid_item_new_label (NULL, NULL)", EXPECT_OK},
+ {*test33c1, "grid_item_set_emblem (foo, \"bar\")", EXPECT_OK},
+ {*test33c2, "grid_item_set_emblem (foo, NULL)", EXPECT_OK},
+ {*test33c3, "grid_item_set_emblem (NULL, \"bar\")", EXPECT_ASSERT},
+ {*test33c4, "grid_item_set_emblem (NULL, NULL)", EXPECT_ASSERT},
+ {*test33d1, "grid_item_get_emblem (foo)", EXPECT_OK},
+ {*test33d2, "grid_item_get_emblem (foo) (no emblem)", EXPECT_ASSERT},
+ {*test33d3, "grid_item_get_emblem (NULL)", EXPECT_ASSERT},
+ {*test33e, "grid_item: destroy", EXPECT_OK},
+ {*test34a, "grid_new ()", EXPECT_OK},
+ {*test34b1, "grid_set_style (foo, \"bar\")", EXPECT_OK},
+ {*test34b2, "grid_set_style (foo, NULL)", EXPECT_OK},
+ {*test34b3, "grid_set_style (NULL, \"foo\")", EXPECT_ASSERT},
+ {*test34b4, "grid_set_style (NULL, NULL)", EXPECT_ASSERT},
+ {*test34c1, "grid_get_style (foo)", EXPECT_OK},
+ {*test34c2, "grid_get_style (foo) (no style)", EXPECT_OK},
+ {*test34c3, "grid_get_style (NULL)", EXPECT_ASSERT},
+ {*test34d1, "grid_set_sb_pos (foo, 0)", EXPECT_OK},
+ {*test34d2, "grid_set_sb_pos (NULL, 0)", EXPECT_ASSERT},
+ {*test34e1, "grid_get_sb_pos (foo)", EXPECT_OK},
+ {*test34e2, "grid_get_sb_pos (NULL)", EXPECT_ASSERT},
+ {*test34f1, "grid_add (grid, item)", EXPECT_OK},
+ {*test34f2, "grid_add (grid, NULL)", EXPECT_ASSERT},
+ {*test34f3, "grid_add (grid, something)", EXPECT_ASSERT},
+ {*test34f4, "grid_add (NULL, whatever)", EXPECT_ASSERT},
+ {*test34f5, "grid_add (whatever, we)", EXPECT_ASSERT},
+ {*test34g1, "grid_remove (item) (exist)", EXPECT_OK},
+ {*test34g2, "grid_remove (item) (non-exist)", EXPECT_ASSERT},
+ {*test34g3, "grid_remove (NULL)", EXPECT_ASSERT},
+ {*test34g4, "grid_remove (something)", EXPECT_ASSERT},
+ {*test34g5, "grid_remove (NULL, some)", EXPECT_ASSERT},
+ {*test34g6, "grid_remove (some, some)", EXPECT_ASSERT},
+ {*test34h1, "grid_set_focus (item) (exist)", EXPECT_OK},
+ {*test34h2, "grid_set_focus (item) (non-exist)", EXPECT_ASSERT},
+ {*test34h3, "grid_set_focus (NULL)", EXPECT_OK},
+ {*test34h4, "grid_set_focus (something)", EXPECT_ASSERT},
+ {*test34i1, "grid: CONTAINER->focus_child (set)", EXPECT_OK},
+ {*test34i2, "grid: CONTAINER->focus_child (unset)", EXPECT_OK},
+ {*test34j1, "grid: destroy (items)", EXPECT_OK},
+ {*test34j2, "grid: destroy (no items)", EXPECT_OK},
+ {*test35a, "hildon_time_editor_new", EXPECT_OK},
+ {*test35b, "hildon_time_editor_set/get_time", EXPECT_OK},
+ {*test35c, "hildon_time_editor_show_seconds", EXPECT_OK},
+ {*test35d, "hildon_time_editor_enable_duration_mode", EXPECT_OK},
+ {*test35e, "hildon_time_editor_set/get_duration_range", EXPECT_OK},
+ {*test35f, "hildon_time_editor_enable_duration_mode (TRUE, FALSE", EXPECT_OK},
+ {*test35g, "hildon_time_editor_set/get_time with foo value check", EXPECT_ASSERT},
+ {*test35h, "hildon_time_editor_set/get_duration_range with foo value check", EXPECT_ASSERT},
+#if 0
+ {*test36a, "hildon_find_replace_dialog_new", EXPECT_OK},
+ {*test36b, "hildon_find_replace_dialog_new_with_options", EXPECT_OK},
+ {*test36c, "hildon_find_replace_dialog_get_text", EXPECT_OK},
+ {*test36d, "hildon_find_replace_dialog_get_new_text", EXPECT_OK},
+#endif
+ {*test37a, "gtk_infoprint_temporarily_disable_wrap", EXPECT_OK},
+ {*test37b, "gtk_banner_temporarily_disable_wrap", EXPECT_OK},
+ {*test39a, "namepassword dialog get_name", EXPECT_OK},
+ {*test39b, "namepassword dialog get_password", EXPECT_OK},
+/* {*test38a, "gtk_confirmation_banner (sometext)", EXPECT_OK},
+ {*test38a, "gtk_confirmation_banner (NULL)", EXPECT_OK},*/
+
+ { test42, "hildon_caption_new", EXPECT_OK },
+ { test43, "hildon_get_password_dialog_new", EXPECT_OK },
+ { test44, "hildon_get_password_dialog_new_with_default", EXPECT_OK },
+ { test45, "hildon_calendor_popup_new", EXPECT_OK },
+ { test46, "hildon_add_home_dialog_new", EXPECT_OK },
+
+ {0} /*REMEMBER THE TERMINATING NULL*/
+};
+
+/*use EXPECT_ASSERT for the tests that are _meant_ to throw assert so they are
+*considered passed when they throw assert and failed when they do not
+*/
+
+testcase* get_tests()
+{
+ g_log_set_always_fatal (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+ return tcases;
+}
diff --git a/tests/run_tests b/tests/run_tests
new file mode 100755
index 0000000..c96cf34
--- /dev/null
+++ b/tests/run_tests
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#CK_FORK=no ./check_test 2> /dev/null
+CK_FORK=yes ./check_test 2> /dev/null
+
diff --git a/tests/tc_banner_truncate.c b/tests/tc_banner_truncate.c
new file mode 100644
index 0000000..ef056d7
--- /dev/null
+++ b/tests/tc_banner_truncate.c
@@ -0,0 +1,163 @@
+/*
+ * This file is part of hildon-libs
+ *
+ * Copyright (C) 2005, 2006 Nokia Corporation, all rights reserved.
+ *
+ * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+/*
+
+ gcc `pkg-config --cflags gtk+-2.0 hildon-libs` `pkg-config --libs gtk+-2.0 hildon-libs` -o tc_banner_truncate tc_banner_truncate.c && DISPLAY=:2 run-standalone.sh ./tc_banner_truncate 1
+
+ Usage 1: tc_banner_truncate <case #>
+ Usage 2: tc_banner_truncate <1|2|3> the string you like to be displayed
+ 1 -> information banner
+ 2 -> progress banner
+ 3 -> animation banner
+*/
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+#include <hildon-widgets/hildon-banner.h>
+
+#define WAIT g_timeout_add(3000, (GSourceFunc)(gtk_main_quit), NULL);
+
+#define TC_INFO(string) hildon_banner_show_information(window, NULL, string); WAIT;
+#define TC_ANIM(string) banner = hildon_banner_show_animation(NULL, NULL, string);
+#define TC_PROG(string) banner = hildon_banner_show_progress (NULL, NULL, string);
+
+static void get_argv_string(int argc, char ** argv, char *text);
+
+int main(int argc, char **argv)
+{
+ GtkWidget *window;
+ GtkWidget *banner;
+ int n;
+ char text[10000];
+
+ if(argc < 2){ fprintf(stderr, "Add case # as parameter.\n"); return 1;}
+ if(argc >= 2){ if(sscanf(argv[1], "%d", &n) == 0) n = 1;}
+ if(argc > 2){ get_argv_string(argc, argv, text);}
+
+ gtk_init(&argc, &argv);
+
+ window = gtk_dialog_new();
+
+ if(argc > 2){
+ /* text is given in the command line */
+ switch (n){
+ case 1: TC_INFO(text); break;
+ case 2: TC_PROG(text); break;
+ case 3: TC_ANIM(text); break;
+ default:TC_INFO(text); break;
+ }
+ n = -99999;
+ }
+
+ switch (n) {
+ /* NOTE: comments (*) are given for 0.12.12, with default theme (orange)
+ * (*) "truncated", WRAPPED", etc.
+ */
+
+ case 0: TC_INFO(""); break;
+ case 1: TC_INFO("loading..."); break;
+
+ case 11: TC_INFO("mmmmmmmmmmmmmmmmmm m.." ); break; //1 line
+ case 12: TC_INFO("mmmmmmmmmmmmmmmmmm m..." ); break; //truncated
+ case 13: TC_INFO("mmmmmmmmmmmmmmmmmm m...." ); break; //truncated
+ case 14: TC_INFO("mmmmmmmmmmmmmmmmmm m....." ); break; //truncated
+ case 15: TC_INFO("mmmmmmmmmmmmmmmmmm m......" ); break; //truncated
+ case 16: TC_INFO("mmmmmmmmmmmmmmmmmm m......." ); break; //truncated
+ case 17: TC_INFO("mmmmmmmmmmmmmmmmmm m........" ); break; //truncated
+ case 18: TC_INFO("mmmmmmmmmmmmmmmmmm m........."); break; //WRAPPED
+
+ case 21: TC_INFO("maximum number of characters xxxxxxxx"); break; //WRAPPED
+ case 22: TC_INFO("maximum number of characters xxxxxxxi"); break; //truncated
+
+ case 23: TC_INFO("Maximum number of characters reache" ); break; //1 line
+ case 24: TC_INFO("Maximum number of characters reached" ); break; //truncated
+ case 25: TC_INFO("Maximum number of characters reached." ); break; //truncated
+ case 26: TC_INFO("Maximum number of characters reached " ); break; //truncated
+ case 27: TC_INFO("Maximum number of characters reached a"); break; //WRAPPED
+
+ /* progress banners */
+ case 101: TC_PROG("" ); break;
+ case 102: TC_PROG("hello" ); break;
+ case 103: TC_PROG("hello progress" ); break;
+
+ /* Bugzilla related TC */
+ case -1: case 25305: TC_INFO("Maximum number of characters reached"); break;
+ case -2: case 23430: TC_INFO("Unable to manage folders during searching"); break; //PASSED
+ case -3: case 26624: TC_ANIM("Connection Manager - Loading"); break;
+ case -4: case 26161: TC_ANIM("Painel de Controle - carregando"); break;
+ case -5: case 26203: TC_ANIM("Caricamento di Pannello di controllo"); break;
+ case -6: case 27875: TC_ANIM("Instant messaging - loading"); break;
+ case -7: case 28760: TC_ANIM("Teach Handwriting- Loading"); break;
+
+ /* word longer than max width */
+ case 201: TC_INFO("mmmmmmmmmmmmmmmmmmmmmmmmmmmmm 1 2 3 4"); break;
+
+ /* misc */
+ case 202: TC_INFO("Maximum number of characters reached osaidfh galds hgdslf helius grkdsz vfliesdfrjaesfrszri os o ozx oyli l ilij ero worjw aeowaijf osijf a jfaowijef aoweijf s faoij flsaijf sajfd oaijfe aosi e 1 2 3 4"); break; /* TRUNCATED after last 'e' */
+
+
+ /* TC for plain GTK (no theme) */
+ case -1031: TC_INFO("iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiil i."); break; //1 line
+ case -1032: TC_INFO("iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiil i."); break; //WRAPPED
+
+ case -1033: TC_INFO("mmmmmmmmmmmmmmmmmm m................................................i" ); break; //1 line
+ case -1034: TC_INFO("mmmmmmmmmmmmmmmmmm m.................................................i"); break; //WRAPPED
+
+
+ default:
+ WAIT;
+ }
+
+ gtk_main();
+ return 0;
+}
+
+
+
+
+
+
+
+
+/* ############################################################################## */
+/* ############################################################################## */
+/* ############################################################################## */
+
+static void get_argv_string(int argc, char ** argv, char *text){
+ int i,j;
+ char * s;
+ s = text;
+ for(i=2; i<argc; i++){
+ for(j=0; argv[i][j] != '\0'; j++){
+ *s = argv[i][j];
+ s++;
+ }
+ if(i<(argc-1)){
+ *s=' ';
+ s++;
+ }
+ }
+ /* hem */
+}
diff --git a/tests/test_suites.h b/tests/test_suites.h
new file mode 100644
index 0000000..fc99bf1
--- /dev/null
+++ b/tests/test_suites.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2006 Nokia Corporation.
+ *
+ * Contact: Luc Pionchon <luc.pionchon@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef _TEST_SUITES_H_
+#define _TEST_SUITES_H_
+
+#define TEST_STRING "aBcD0123-_$%\\/(]{=?! <:;.,*+'^`\"|@#~"
+
+Suite *create_hildon_range_editor_suite(void);
+Suite *create_hildon_date_editor_suite(void);
+Suite *create_hildon_number_editor_suite(void);
+Suite *create_hildon_time_editor_suite(void);
+Suite *create_hildon_time_picker_suite(void);
+Suite *create_hildon_calendar_popup_suite(void);
+Suite *create_hildon_weekday_picker_suite(void);
+Suite *create_hildon_controlbar_suite(void);
+Suite *create_hildon_color_button_suite(void);
+Suite *create_hildon_color_selector_suite(void);
+Suite *create_hildon_seekbar_suite(void);
+Suite *create_hildon_dialoghelp_suite(void);
+Suite *create_hildon_caption_suite(void);
+Suite *create_hildon_defines_suite(void);
+Suite *create_hildon_find_toolbar_suite(void);
+Suite *create_hildon_name_password_dialog_suite(void);
+Suite *create_hildon_get_password_dialog_suite(void);
+Suite *create_hildon_set_password_dialog_suite(void);
+Suite *create_hildon_sort_dialog_suite(void);
+Suite *create_hildon_code_dialog_suite(void);
+Suite *create_hildon_note_suite(void);
+Suite *create_hildon_volumebar_suite(void);
+Suite *create_hildon_volumebar_range_suite(void);
+Suite *create_hildon_wizard_dialog_suite(void);
+Suite *create_hildon_banner_suite(void);
+Suite *create_hildon_font_selection_dialog_suite(void);
+Suite *create_hildon_system_sound_suite(void);
+Suite *create_hildon_scroll_area_suite(void);
+Suite *create_hildon_window_suite(void);
+Suite *create_hildon_color_popup_suite(void);
+Suite *create_hildon_program_suite(void);
+Suite *create_hildon_composite_widget_suite(void);
+
+
+#endif