summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <chuneon.park@samsung.com>2020-06-11 10:22:12 +0900
committerHermet Park <chuneon.park@samsung.com>2020-06-11 10:22:12 +0900
commit668e48fb47150d2d952421181d53952c75cb0cad (patch)
tree8d1b6d313328064da2333692834f18be126386b3
parented5255f51659445b50ee8b246f4ad4c51ca5f0f2 (diff)
parent4b223b9720244b605167c79acc957674ad0e4e71 (diff)
downloadefl-668e48fb47150d2d952421181d53952c75cb0cad.tar.gz
Merge branch 'master' into devs/hermet/lottie
-rw-r--r--doc/eo_tutorial.dox4
-rw-r--r--src/bin/elementary/test_ui_textpath.c20
-rw-r--r--src/lib/ecore/Efl_Core.h2
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c11
-rw-r--r--src/lib/eina/eina_log.c3
-rw-r--r--src/lib/eina/eina_log.h4
-rw-r--r--src/lib/eina/eina_module.h4
-rw-r--r--src/lib/elementary/Efl_Ui.h4
-rw-r--r--src/lib/elementary/efl_ui_textpath.c73
-rw-r--r--src/lib/elementary/elm_code_parse.h6
-rw-r--r--src/lib/elementary/elm_general.h2
-rw-r--r--src/lib/elementary/elm_textpath_legacy.h15
-rw-r--r--src/lib/elementary/elm_widget.h2
-rw-r--r--src/lib/evas/common/evas_font_private.h2
-rw-r--r--src/lib/evas/include/evas_common_private.h2
-rw-r--r--src/modules/ecore/system/systemd/ecore_system_systemd.c2
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c4
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c5
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h42
-rw-r--r--src/tests/eina/eina_test_file.c6
-rw-r--r--src/tests/eina/eina_test_matrixsparse.c2
-rw-r--r--src/tests/eina/eina_test_module.c4
-rw-r--r--src/tests/eo/suite/eo_test_class_simple.c11
-rw-r--r--src/tests/evas/evas_test_image.c3
24 files changed, 187 insertions, 46 deletions
diff --git a/doc/eo_tutorial.dox b/doc/eo_tutorial.dox
index baeb10d857..1cf0a2ee12 100644
--- a/doc/eo_tutorial.dox
+++ b/doc/eo_tutorial.dox
@@ -122,7 +122,7 @@
* - If the object is new, establish the public APIs
* - \#define \$(CLASS_NAME) \$(class_name)_class_get(): will be used to access data/inherit from this class...
* - const Eo_Class *\$(class_name)_class_get(void) EINA_CONST: declaration of the function that will create the class (not the instance), i.e virtual table...
- * - extern EAPI Eo_Op \$(CLASS_NAME)_BASE_ID: class id that will be essentially used to identify functions set of this class
+ * - EAPI extern Eo_Op \$(CLASS_NAME)_BASE_ID: class id that will be essentially used to identify functions set of this class
* - enum of the function ids of the class in the form \$(CLASS_NAME)_SUB_ID: used to identify the function inside the class; function id is unique per class but (class id, function id) is unique per system..
* - \#define \$(CLASS_NAME)_ID(sub_id) (\$(CLASS_NAME)_BASE_ID + sub_id): formula to calculate the system function id
* - define of each function consists of:
@@ -138,7 +138,7 @@
const Eo_Class *evas_object_line_class_get(void) EINA_CONST;
- extern EAPI Eo_Op EVAS_OBJ_LINE_BASE_ID;
+ EAPI extern Eo_Op EVAS_OBJ_LINE_BASE_ID;
enum
{
diff --git a/src/bin/elementary/test_ui_textpath.c b/src/bin/elementary/test_ui_textpath.c
index 40317a9627..41783386b1 100644
--- a/src/bin/elementary/test_ui_textpath.c
+++ b/src/bin/elementary/test_ui_textpath.c
@@ -56,6 +56,20 @@ _short_text_changed_cb(void *data, const Efl_Event *event)
efl_text_set(txtpath, TEST_UI_TEXTPATH_LONG_TEXT);
}
+static char *user_style = "DEFAULT='font_size=16 color=#F00 underline=on underline_color=#00ffff'";
+
+static void
+_user_style_changed_cb(void *data, const Efl_Event *event)
+{
+ Evas_Object *txtpath = data;
+ Eina_Bool val = elm_check_selected_get(event->object);
+
+ if (val)
+ elm_textpath_text_user_style_set(txtpath, user_style);
+ else
+ elm_textpath_text_user_style_set(txtpath, NULL);
+}
+
static void
_change_shape_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@@ -138,6 +152,12 @@ test_ui_textpath(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
elm_box_pack_end(hbox, chk);
efl_gfx_entity_visible_set(chk, EINA_TRUE);
+ chk = efl_add(EFL_UI_CHECK_CLASS, win);
+ efl_text_set(chk, "User style");
+ efl_event_callback_add(chk, EFL_UI_EVENT_SELECTED_CHANGED, _user_style_changed_cb, txtpath);
+ elm_box_pack_end(hbox, chk);
+ efl_gfx_entity_visible_set(chk, EINA_TRUE);
+
hbox = elm_box_add(win);
elm_box_horizontal_set(hbox, EINA_TRUE);
efl_gfx_hint_weight_set(hbox, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND);
diff --git a/src/lib/ecore/Efl_Core.h b/src/lib/ecore/Efl_Core.h
index 0178299379..7e80819b83 100644
--- a/src/lib/ecore/Efl_Core.h
+++ b/src/lib/ecore/Efl_Core.h
@@ -54,7 +54,7 @@
extern "C" {
#endif
-extern EAPI double _efl_startup_time;
+EAPI extern double _efl_startup_time;
#include "Ecore_Common.h"
#include "Ecore_Eo.h"
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 526e0113cd..5fbc809053 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -716,9 +716,14 @@ _ecore_drm_output_free(Ecore_Drm_Output *output)
/* restore crtc state */
if (output->crtc)
- drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id,
- output->crtc->buffer_id, output->crtc->x, output->crtc->y,
- &output->conn_id, 1, &output->crtc->mode);
+ {
+ if (drmModeSetCrtc(output->dev->drm.fd, output->crtc->crtc_id,
+ output->crtc->buffer_id, output->crtc->x, output->crtc->y,
+ &output->conn_id, 1, &output->crtc->mode))
+ {
+ ERR("Failed to restore Crtc state for output %s: %m", output->name);
+ }
+ }
/* free modes */
EINA_LIST_FREE(output->modes, mode)
diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index b60e36bae4..79b70b01cd 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -38,7 +38,10 @@
#endif
#include "eina_debug_private.h"
+
+#ifdef HAVE_BACKTRACE
//#define EINA_LOG_BACKTRACE
+#endif
#include "eina_config.h"
#include "eina_private.h"
diff --git a/src/lib/eina/eina_log.h b/src/lib/eina/eina_log.h
index fd6f6c4252..b45a191ac2 100644
--- a/src/lib/eina/eina_log.h
+++ b/src/lib/eina/eina_log.h
@@ -979,9 +979,9 @@ EAPI void eina_log_console_color_set(FILE *fp,
const char *color) EINA_ARG_NONNULL(1, 2);
/** String that indicates the log system is initializing. */
-extern EAPI const char *_eina_log_state_init;
+EAPI extern const char *_eina_log_state_init;
/** String that indicates the log system is shutting down. */
-extern EAPI const char *_eina_log_state_shutdown;
+EAPI extern const char *_eina_log_state_shutdown;
/**
* @def EINA_LOG_STATE_INIT
* String that indicates the log system is initializing
diff --git a/src/lib/eina/eina_module.h b/src/lib/eina/eina_module.h
index 1fbd6153ac..22f4c3f190 100644
--- a/src/lib/eina/eina_module.h
+++ b/src/lib/eina/eina_module.h
@@ -106,8 +106,8 @@ typedef void (*Eina_Module_Shutdown)(void);
*/
#define EINA_MODULE_SHUTDOWN(f) EXPORTAPI Eina_Module_Shutdown __eina_module_shutdown = &f
-extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE;
-extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED;
+EAPI extern Eina_Error EINA_ERROR_WRONG_MODULE;
+EAPI extern Eina_Error EINA_ERROR_MODULE_INIT_FAILED;
/**
* @brief Returns a new module.
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index e2d0cf6abe..3a64e9fdb0 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -105,10 +105,10 @@
extern "C" {
#endif
-extern EAPI double _efl_startup_time;
+EAPI extern double _efl_startup_time;
/** Successfully applied the requested style from the current theme. */
-extern EAPI Eina_Error EFL_UI_THEME_APPLY_ERROR_NONE;
+EAPI extern Eina_Error EFL_UI_THEME_APPLY_ERROR_NONE;
// EO types. Defined for legacy-only builds as legacy uses typedef of EO types.
#include "efl_ui.eot.h"
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index 3cb1d96809..539f996108 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -15,6 +15,8 @@
#define MY_CLASS EFL_UI_TEXTPATH_CLASS
#define MY_CLASS_NAME "Efl.Ui.Textpath"
+#define LEGACY_TEXT_PART_NAME "elm.text"
+#define EFL_UI_TEXT_PART_NAME "efl.text"
#define SLICE_DEFAULT_NO 99
typedef struct _Efl_Ui_Textpath_Point Efl_Ui_Textpath_Point;
@@ -54,6 +56,7 @@ struct _Efl_Ui_Textpath_Data
{
Evas_Object *text_obj;
char *text;
+ Eina_Strbuf *user_style;
Efl_Gfx_Path *path;
struct {
double x, y;
@@ -529,13 +532,40 @@ _sizing_eval(Efl_Ui_Textpath_Data *pd)
}
static void
-_textpath_ellipsis_set(Efl_Ui_Textpath_Data *pd, Eina_Bool enabled)
+_textpath_ellipsis_set(Eo *obj, Efl_Ui_Textpath_Data *pd, Eina_Bool enabled)
{
- edje_object_part_text_style_user_pop(pd->text_obj, "efl.text");
+ char *text_part;
+ if (elm_widget_is_legacy(obj))
+ text_part = LEGACY_TEXT_PART_NAME;
+ else
+ text_part = EFL_UI_TEXT_PART_NAME;
+
+ edje_object_part_text_style_user_pop(pd->text_obj, text_part);
if (enabled)
- edje_object_part_text_style_user_push(pd->text_obj, "efl.text",
- "DEFAULT='ellipsis=1.0'");
+ {
+ if (pd->user_style)
+ {
+ eina_strbuf_replace_first(pd->user_style, "DEFAULT='", "DEFAULT='ellipsis=1.0 ");
+ edje_object_part_text_style_user_push(pd->text_obj, text_part,
+ eina_strbuf_string_get(pd->user_style));
+ }
+ else
+ {
+ edje_object_part_text_style_user_push(pd->text_obj, text_part,
+ "DEFAULT='ellipsis=1.0 '");
+ return;
+ }
+ }
+ else
+ {
+ if (pd->user_style)
+ {
+ eina_strbuf_replace_first(pd->user_style, "DEFAULT='ellipsis=1.0 ", "DEFAULT='");
+ edje_object_part_text_style_user_push(pd->text_obj, text_part,
+ eina_strbuf_string_get(pd->user_style));
+ }
+ }
}
static void
@@ -563,7 +593,7 @@ _ellipsis_set(Efl_Ui_Textpath_Data *pd, Eo *obj)
}
}
efl_gfx_entity_size_set(pd->text_obj, EINA_SIZE2D(w, h));
- _textpath_ellipsis_set(pd, is_ellipsis);
+ _textpath_ellipsis_set(obj, pd, is_ellipsis);
}
static void
@@ -713,6 +743,7 @@ _efl_ui_textpath_efl_object_destructor(Eo *obj, Efl_Ui_Textpath_Data *pd)
if (pd->text) free(pd->text);
if (pd->text_obj) evas_object_del(pd->text_obj);
+ if (pd->user_style) eina_strbuf_free(pd->user_style);
EINA_INLIST_FREE(pd->segments, seg)
{
pd->segments = eina_inlist_remove(pd->segments, EINA_INLIST_GET(seg));
@@ -1013,5 +1044,37 @@ elm_textpath_circle_set(Eo *obj, double x, double y, double radius, double start
efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(x * 2, y * 2));
}
+EAPI void
+elm_textpath_text_user_style_set(Eo *obj, const char *style)
+{
+ EFL_UI_TEXTPATH_DATA_GET(obj, pd);
+ if (!pd) return;
+
+ char *text_part;
+ if (elm_widget_is_legacy(obj))
+ text_part = LEGACY_TEXT_PART_NAME;
+ else
+ text_part = EFL_UI_TEXT_PART_NAME;
+
+ if (pd->user_style)
+ {
+ edje_object_part_text_style_user_pop(pd->text_obj, text_part);
+ eina_strbuf_free(pd->user_style);
+ pd->user_style = NULL;
+ }
+
+ if (style)
+ {
+ pd->user_style = eina_strbuf_new();
+ eina_strbuf_append(pd->user_style, style);
+
+ edje_object_part_text_style_user_pop(pd->text_obj, text_part);
+ edje_object_part_text_style_user_push(pd->text_obj, text_part, eina_strbuf_string_get(pd->user_style));
+ }
+
+ _ellipsis_set(pd, obj);
+ _sizing_eval(pd);
+}
+
#include "efl_ui_textpath_legacy_eo.c"
diff --git a/src/lib/elementary/elm_code_parse.h b/src/lib/elementary/elm_code_parse.h
index 4b53e0f2c9..91cd5eba13 100644
--- a/src/lib/elementary/elm_code_parse.h
+++ b/src/lib/elementary/elm_code_parse.h
@@ -12,9 +12,9 @@ extern "C" {
typedef struct _Elm_Code_Parser Elm_Code_Parser;
-extern EAPI Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_SYNTAX; /**< A provided parser to provide syntax highlighting */
-extern EAPI Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_DIFF; /**< A provided parser that will mark up diff text */
-extern EAPI Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_TODO; /**< A provided parser that will highlight TODO and FIXME lines */
+EAPI extern Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_SYNTAX; /**< A provided parser to provide syntax highlighting */
+EAPI extern Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_DIFF; /**< A provided parser that will mark up diff text */
+EAPI extern Elm_Code_Parser *ELM_CODE_PARSER_STANDARD_TODO; /**< A provided parser that will highlight TODO and FIXME lines */
/**
* @brief Parser helper functions.
diff --git a/src/lib/elementary/elm_general.h b/src/lib/elementary/elm_general.h
index ff23de9f0f..84d7e49e79 100644
--- a/src/lib/elementary/elm_general.h
+++ b/src/lib/elementary/elm_general.h
@@ -522,7 +522,7 @@ EAPI extern int ELM_EVENT_PROCESS_FOREGROUND;
typedef Eina_Bool (*Elm_Event_Cb)(void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info); /**< Function prototype definition for callbacks on input events happening on Elementary widgets. @a data will receive the user data pointer passed to elm_object_event_callback_add(). @a src will be a pointer to the widget on which the input event took place. @a type will get the type of this event and @a event_info, the struct with details on this event. */
-extern EAPI double _elm_startup_time;
+EAPI extern double _elm_startup_time;
#ifndef ELM_LIB_QUICKLAUNCH
#define ELM_MAIN() int main(int argc, char **argv) { int ret__; _elm_startup_time = ecore_time_unix_get(); elm_init(argc, argv); ret__ = elm_main(argc, argv); elm_shutdown(); return ret__; } /**< macro to be used after the elm_main() function */
diff --git a/src/lib/elementary/elm_textpath_legacy.h b/src/lib/elementary/elm_textpath_legacy.h
index 1795bdfa60..95aca9b1db 100644
--- a/src/lib/elementary/elm_textpath_legacy.h
+++ b/src/lib/elementary/elm_textpath_legacy.h
@@ -12,4 +12,19 @@ typedef Eo Elm_Textpath;
*/
EAPI Evas_Object *elm_textpath_add(Evas_Object *parent);
+/**
+ * @brief Set the user text style
+ *
+ * @param[in] obj The textpath object
+ * @param[in] style The user text style. If the sytle is $null, the default style will be applied
+ *
+ * @note ellipsis in the style will be ignored since textpath supports ellipsis API.
+ * @see elm_textpath_ellipsis_set()
+ *
+ * @ingroup Elm_Textpath
+ *
+ * @since 1.25
+ */
+EAPI void elm_textpath_text_user_style_set(Evas_Object *obj, const char *style);
+
#include "efl_ui_textpath_eo.legacy.h"
diff --git a/src/lib/elementary/elm_widget.h b/src/lib/elementary/elm_widget.h
index 8a6d5dd855..88e3ff6b39 100644
--- a/src/lib/elementary/elm_widget.h
+++ b/src/lib/elementary/elm_widget.h
@@ -301,7 +301,7 @@
#include "efl_ui.eot.h"
typedef Eo Efl_Ui_Focus_Manager;
-extern EAPI Eina_Error EFL_UI_THEME_APPLY_ERROR_NONE;
+EAPI extern Eina_Error EFL_UI_THEME_APPLY_ERROR_NONE;
#define _EFL_UI_FOCUS_MANAGER_EO_CLASS_TYPE
#include "efl_ui_focus_object.eo.h"
diff --git a/src/lib/evas/common/evas_font_private.h b/src/lib/evas/common/evas_font_private.h
index 213ef7f96f..4ff9a12ab1 100644
--- a/src/lib/evas/common/evas_font_private.h
+++ b/src/lib/evas/common/evas_font_private.h
@@ -4,7 +4,7 @@
#include "evas_font.h"
/* macros needed to log message through eina_log */
-extern EAPI int _evas_font_log_dom_global;
+EAPI extern int _evas_font_log_dom_global;
#ifdef _EVAS_FONT_DEFAULT_LOG_DOM
# undef _EVAS_FONT_DEFAULT_LOG_DOM
#endif
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 0190b27163..4d9368b31b 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -86,7 +86,7 @@
#endif
/* macros needed to log message through eina_log */
-extern EAPI int _evas_log_dom_global;
+EAPI extern int _evas_log_dom_global;
#ifdef _EVAS_DEFAULT_LOG_DOM
# undef _EVAS_DEFAULT_LOG_DOM
#endif
diff --git a/src/modules/ecore/system/systemd/ecore_system_systemd.c b/src/modules/ecore/system/systemd/ecore_system_systemd.c
index 78e3185287..ab19ff36cd 100644
--- a/src/modules/ecore/system/systemd/ecore_system_systemd.c
+++ b/src/modules/ecore/system/systemd/ecore_system_systemd.c
@@ -163,7 +163,7 @@ static void _locale_get(void *data EINA_UNUSED, const Eldbus_Message *msg,
setenv(type, value, 1);
}
- setlocale(__LC_ALL, "");
+ setlocale(LC_ALL, "");
end:
ecore_event_add(ECORE_EVENT_LOCALE_CHANGED, NULL, NULL, NULL);
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 450f0aa16c..8142f0999b 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -6,8 +6,8 @@
#include <Evas_Engine_Wayland.h>
#include "ecore_wl2_internal.h"
-extern EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
-extern EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
+EAPI extern Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
+EAPI extern void _evas_canvas_image_data_regenerate(Eina_List *list);
#define _smart_frame_type "ecore_evas_wl_frame"
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index c094515e93..4b9e734d61 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -324,6 +324,7 @@ _test_activated_window_activate(void *data EINA_UNUSED, int type EINA_UNUSED, vo
EFL_START_TEST(wl2_window_activated)
{
Test_Data *td;
+ Eina_Bool ret = EINA_FALSE;
ecore_wl2_init();
@@ -345,7 +346,9 @@ EFL_START_TEST(wl2_window_activated)
ecore_wl2_window_show(td->win);
- _init_egl(td);
+ ret = _init_egl(td);
+ fail_if(ret != EINA_TRUE);
+
td->handler = ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_CONFIGURE_COMPLETE,
_test_activated_configure_complete, td);
ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_ACTIVATE,
diff --git a/src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h b/src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h
index 03da269c38..10605428be 100644
--- a/src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h
+++ b/src/tests/ecore_wl2/ecore_wl2_tests_helper_egl.h
@@ -5,29 +5,51 @@
#include <EGL/egl.h>
#include <GLES2/gl2.h>
-static void
+static Eina_Bool
_init_egl(Test_Data *td)
{
eglBindAPI(EGL_OPENGL_API);
EGLint num_config;
- EGLint attributes[] = {
+ EGLint attributes[] =
+ {
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_NONE
- };
+ };
+
+ td->egl_display =
+ eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display));
+
+ if (!eglInitialize(td->egl_display, NULL, NULL))
+ {
+ EINA_LOG_ERR("Failed to initialize egl");
+ eglTerminate(td->egl_display);
+ return EINA_FALSE;
+ }
- td->egl_display = eglGetDisplay((EGLNativeDisplayType)ecore_wl2_display_get(td->display));
- eglInitialize(td->egl_display, NULL, NULL);
- eglChooseConfig(td->egl_display, attributes, &td->egl_conf, 1, &num_config);
- td->egl_context = eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL);
+ if (!eglChooseConfig(td->egl_display, attributes, &td->egl_conf,
+ 1, &num_config))
+ {
+ EINA_LOG_ERR("Failed to choose egl config");
+ eglTerminate(td->egl_display);
+ return EINA_FALSE;
+ }
+
+ td->egl_context =
+ eglCreateContext(td->egl_display, td->egl_conf, EGL_NO_CONTEXT, NULL);
td->egl_window = wl_egl_window_create(td->surface, td->width, td->height);
- td->egl_surface = eglCreateWindowSurface(td->egl_display,
- td->egl_conf, td->egl_window, NULL);
- eglMakeCurrent(td->egl_display, td->egl_surface, td->egl_surface, td->egl_context);
+ td->egl_surface =
+ eglCreateWindowSurface(td->egl_display,
+ td->egl_conf, td->egl_window, NULL);
+
+ eglMakeCurrent(td->egl_display, td->egl_surface,
+ td->egl_surface, td->egl_context);
+
+ return EINA_TRUE;
}
static void
diff --git a/src/tests/eina/eina_test_file.c b/src/tests/eina/eina_test_file.c
index 8ef3d1a290..ccd6e55ca5 100644
--- a/src/tests/eina/eina_test_file.c
+++ b/src/tests/eina/eina_test_file.c
@@ -814,7 +814,7 @@ EFL_START_TEST(eina_test_file_mktemp)
fd = eina_file_mkstemp(buf, &tmpfile);
fail_if((fd < 0) || !tmpfile || errno);
- close(fd);
+ fail_if(close(fd));
it = eina_file_direct_ls(tmpdir);
fail_if(!it);
@@ -825,8 +825,8 @@ EFL_START_TEST(eina_test_file_mktemp)
eina_iterator_free(it);
- unlink(tmpfile);
- remove(tmpdir);
+ fail_if(unlink(tmpfile));
+ fail_if(remove(tmpdir));
}
EFL_END_TEST
diff --git a/src/tests/eina/eina_test_matrixsparse.c b/src/tests/eina/eina_test_matrixsparse.c
index 5c8b548508..d2ad4c602f 100644
--- a/src/tests/eina/eina_test_matrixsparse.c
+++ b/src/tests/eina/eina_test_matrixsparse.c
@@ -145,9 +145,11 @@ EFL_START_TEST(eina_test_simple)
fail_if(row != 3 || col != 5);
test1 = eina_matrixsparse_data_idx_get(matrix, 4, 3);
+ fail_if(test1 == NULL);
fail_if(*test1 != data[4][3]);
test1 = eina_matrixsparse_data_idx_get(matrix, 1, 3);
+ fail_if(test1 == NULL);
fail_if(*test1 != data[1][3]);
/* data changing */
diff --git a/src/tests/eina/eina_test_module.c b/src/tests/eina/eina_test_module.c
index 68ad598899..44b2389e73 100644
--- a/src/tests/eina/eina_test_module.c
+++ b/src/tests/eina/eina_test_module.c
@@ -32,14 +32,14 @@ static Eina_Bool list_cb(Eina_Module *m, void *data EINA_UNUSED)
const char *file;
/* the reference count */
- eina_module_load(m);
+ fail_if(!eina_module_load(m));
/* get */
sym = eina_module_symbol_get(m, "dummy_symbol");
fail_if(!sym);
fail_if(*sym != 0xbad);
file = eina_module_file_get(m);
fail_if(!file);
- eina_module_unload(m);
+ fail_if(eina_module_unload(m));
return EINA_TRUE;
}
diff --git a/src/tests/eo/suite/eo_test_class_simple.c b/src/tests/eo/suite/eo_test_class_simple.c
index 846c2f2cb0..90449c6853 100644
--- a/src/tests/eo/suite/eo_test_class_simple.c
+++ b/src/tests/eo/suite/eo_test_class_simple.c
@@ -27,12 +27,19 @@ static Eina_Error
_a_set_reflect(Eo *obj, Eina_Value value)
{
int a;
+ Eina_Error r = 0;
- eina_value_int_convert(&value, &a);
+ if (!eina_value_int_convert(&value, &a))
+ {
+ r = EINA_ERROR_VALUE_FAILED;
+ goto end;
+ }
simple_a_set(obj, a);
+
+end:
eina_value_flush(&value);
- return 0;
+ return r;
}
static int
diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c
index 7ee16048c8..8106a0869e 100644
--- a/src/tests/evas/evas_test_image.c
+++ b/src/tests/evas/evas_test_image.c
@@ -904,7 +904,8 @@ EFL_START_TEST(evas_object_image_map_unmap)
// save file, verify its pixels
fd = eina_file_mkstemp("/tmp/evas-test.XXXXXX.png", &tmp);
- close(fd);
+ fail_if(fd <= 0);
+ fail_if(close(fd));
if (efl_file_save(o, tmp, NULL, NULL))
{
Eina_Rw_Slice sorig, sdest;