diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2019-04-18 09:59:58 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2019-04-18 09:59:58 +0900 |
commit | cf70826b33a6840f884c090e911f501c758931a7 (patch) | |
tree | 3ce2fa8dc7afdcbbd0cbec7369d333418101fb6f /src/tests/evas | |
parent | 7404904a43992e008ef8f186216a9aba8006404c (diff) | |
download | efl-cf70826b33a6840f884c090e911f501c758931a7.tar.gz |
tests: add api coverage for evas image
Summary:
verify that legacy apis function as expected when using legacy api to
load and unload images
Depends on D8618
Reviewers: Hermet
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D8619
Diffstat (limited to 'src/tests/evas')
-rw-r--r-- | src/tests/evas/evas_test_image.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c index da6ad42365..259cff77d3 100644 --- a/src/tests/evas/evas_test_image.c +++ b/src/tests/evas/evas_test_image.c @@ -729,6 +729,40 @@ EFL_START_TEST(evas_object_image_cached_data_comparision) } EFL_END_TEST +EFL_START_TEST(evas_object_image_api) +{ + Evas *e = _setup_evas(); + Evas_Object *o; + void *pix; + int w, h; + + o = evas_object_image_filled_add(e); + /* test file load */ + evas_object_image_file_set(o, TESTS_IMG_DIR"/Light.jpg", NULL); + ck_assert(!!efl_file_get(o)); + pix = evas_object_image_data_get(o, EINA_FALSE); + ck_assert(!!pix); + evas_object_image_size_get(o, &w, &h); + ck_assert(w && h); + /* test file unload */ + evas_object_image_file_set(o, NULL, NULL); + ck_assert(!efl_file_get(o)); + pix = evas_object_image_data_get(o, EINA_FALSE); + ck_assert(!pix); + evas_object_image_size_get(o, &w, &h); + ck_assert(!w && !h); + /* test file load after unload */ + evas_object_image_file_set(o, TESTS_IMG_DIR"/Light.jpg", NULL); + ck_assert(!!efl_file_get(o)); + pix = evas_object_image_data_get(o, EINA_FALSE); + ck_assert(!!pix); + evas_object_image_size_get(o, &w, &h); + ck_assert(w && h); + + evas_free(e); +} +EFL_END_TEST + EFL_START_TEST(evas_object_image_defaults) { Evas *e = _setup_evas(); @@ -972,6 +1006,7 @@ EFL_END_TEST void evas_test_image_object(TCase *tc) { + tcase_add_test(tc, evas_object_image_api); tcase_add_test(tc, evas_object_image_defaults); tcase_add_test(tc, evas_object_image_loader); tcase_add_test(tc, evas_object_image_loader_orientation); |