summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-03-26 13:16:32 +0900
committerHermet Park <hermetpark@gmail.com>2019-03-26 13:16:32 +0900
commit43b199aca322a2774d72d7a3b6ad8f898914978e (patch)
tree4f541b68a08a3cf6b8491587c32306a9daa392ae /src/tests
parent18349ac73f466771746cce3e0d3cf31c6ccf7b25 (diff)
elm_photocam: fix file_get,set operations
Summary: This patch fixes bug that elm_photocam_file_get always return NULL. Test Plan: make check Reviewers: Hermet, zmike, bu5hm4n Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8472
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/elementary/elm_test_photocam.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_test_photocam.c b/src/tests/elementary/elm_test_photocam.c
index b2bf4ecc12..8313fdb0d2 100644
--- a/src/tests/elementary/elm_test_photocam.c
+++ b/src/tests/elementary/elm_test_photocam.c
@@ -41,8 +41,25 @@ EFL_START_TEST(elm_atspi_role_get)
41} 41}
42EFL_END_TEST 42EFL_END_TEST
43 43
44EFL_START_TEST(elm_photocam_file)
45{
46 Evas_Object *win, *photocam;
47 const char *buf = ELM_IMAGE_DATA_DIR "/images/logo_small.png";
48
49 win = win_add(NULL, "photocam", ELM_WIN_BASIC);
50 photocam = elm_photocam_add(win);
51
52 ck_assert_int_eq(elm_photocam_file_set(photocam, buf), EVAS_LOAD_ERROR_NONE);
53 ck_assert_str_eq(elm_photocam_file_get(photocam), buf);
54
55 ck_assert_int_eq(elm_photocam_file_set(photocam, "non_existing.png"), EVAS_LOAD_ERROR_DOES_NOT_EXIST);
56 ck_assert_str_eq(elm_photocam_file_get(photocam), "non_existing.png");
57}
58EFL_END_TEST
59
44void elm_test_photocam(TCase *tc) 60void elm_test_photocam(TCase *tc)
45{ 61{
46 tcase_add_test(tc, elm_photocam_legacy_type_check); 62 tcase_add_test(tc, elm_photocam_legacy_type_check);
47 tcase_add_test(tc, elm_atspi_role_get); 63 tcase_add_test(tc, elm_atspi_role_get);
64 tcase_add_test(tc, elm_photocam_file);
48} 65}