summaryrefslogtreecommitdiff
path: root/src/tests/elementary/efl_ui_test_progressbar.c
blob: bf2f9614034d9a75fa4cee8393e6d55d1839a45f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif

#include <Efl_Ui.h>
#include "efl_ui_suite.h"

static Eo *win, *pb;

static void
check_setup()
{
   win = win_add();

   pb = efl_add(EFL_UI_PROGRESSBAR_CLASS, win);
}

EFL_START_TEST(pb_text)
{
   efl_text_set(pb, "Test the Rest");
   ck_assert_str_eq(efl_text_get(pb), "Test the Rest");
}
EFL_END_TEST

EFL_START_TEST(pb_progress_label)
{
   efl_ui_progressbar_show_progress_label_set(pb, EINA_TRUE);
   ck_assert_int_eq(efl_ui_progressbar_show_progress_label_get(pb), EINA_TRUE);
   efl_ui_progressbar_show_progress_label_set(pb, EINA_FALSE);
   ck_assert_int_eq(efl_ui_progressbar_show_progress_label_get(pb), EINA_FALSE);
}
EFL_END_TEST

void efl_ui_test_progressbar(TCase *tc)
{
   tcase_add_checked_fixture(tc, check_setup, NULL);
   tcase_add_test(tc, pb_text);
   tcase_add_test(tc, pb_progress_label);
}