* 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.
+ * 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
#include <gtk/gtkwindow.h>
#include "test_suites.h"
#include "check_utils.h"
-#include "hildon-caption.h"
+#include <hildon/hildon-caption.h>
#include <gtk/gtkvbox.h>
-#include "hildon-window.h"
+#include <hildon/hildon-window.h>
#include <libintl.h>
+#define _(String) dgettext("hildon-libs", String)
+
/* -------------------- Fixtures -------------------- */
static HildonCaption *caption = 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);
+ expected_ret_label = g_strconcat(TEST_LABEL,_("ecdg_ti_caption_separator"),NULL);
/* Test 1 */
hildon_caption_set_label (caption, TEST_LABEL);
/* Test 2 */
hildon_caption_set_label (caption, "");
- fail_if (strcmp (hildon_caption_get_label (caption),"ecdg_ti_caption_separator") != 0,
+ 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));
}
/* Test 1 */
hildon_caption_set_label (caption, TEST_LABEL);
- expected_ret_label = g_strconcat(TEST_LABEL,"ecdg_ti_caption_separator",NULL);
+ 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",
/* Test 2 */
hildon_caption_set_label (caption, "");
- fail_if (strcmp (hildon_caption_get_label (caption), "ecdg_ti_caption_separator") != 0,
+ 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));
}