X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=tests%2Fcheck-hildon-caption.c;h=9c8203ef0236ac33b401213daa84e0b76f2830c5;hb=363f803d7d98338324e35c9d789e80fa579f775e;hp=a4f8e3a89a029d1cdafafd84d89c469443a576ed;hpb=e332a589ad93718efce61bee7d7c09314a0004b8;p=hildon diff --git a/tests/check-hildon-caption.c b/tests/check-hildon-caption.c index a4f8e3a..9c8203e 100644 --- a/tests/check-hildon-caption.c +++ b/tests/check-hildon-caption.c @@ -8,7 +8,7 @@ * 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 @@ -31,13 +31,15 @@ #include #include "test_suites.h" #include "check_utils.h" -#include "hildon-caption.h" +#include #include -#include "hildon-window.h" +#include #include +#define _(String) dgettext("hildon-libs", String) + /* -------------------- Fixtures -------------------- */ static HildonCaption *caption = NULL; @@ -285,7 +287,7 @@ START_TEST (test_set_label_regular) /* 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); @@ -303,7 +305,7 @@ START_TEST (test_set_label_regular) /* 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)); } @@ -363,7 +365,7 @@ START_TEST (test_get_label_regular) /* 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", @@ -374,7 +376,7 @@ START_TEST (test_get_label_regular) /* 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)); }