ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=b14eabb679d6fbd8eb8b30a8427c9fb92aff877c

commit b14eabb679d6fbd8eb8b30a8427c9fb92aff877c
Author: Andy Williams <a...@andywilliams.me>
Date:   Tue Feb 3 13:55:20 2015 +0000

    Fix the tests to work with widget improvements
---
 elm_code/lib/elm_code_widget_text.c   | 3 +++
 elm_code/tests/elm_code_test_widget.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/elm_code/lib/elm_code_widget_text.c 
b/elm_code/lib/elm_code_widget_text.c
index 30872c8..e96b5d1 100644
--- a/elm_code/lib/elm_code_widget_text.c
+++ b/elm_code/lib/elm_code_widget_text.c
@@ -26,6 +26,9 @@ elm_code_widget_text_left_gutter_width_get(Elm_Code_Widget 
*widget)
    Elm_Code_Widget_Data *pd;
    int width = 1; // the status icon, for now
 
+   if (!widget)
+     return width;
+
    pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
 
    if (pd->show_line_numbers)
diff --git a/elm_code/tests/elm_code_test_widget.c 
b/elm_code/tests/elm_code_test_widget.c
index 6efdce8..22ab5b5 100644
--- a/elm_code/tests/elm_code_test_widget.c
+++ b/elm_code/tests/elm_code_test_widget.c
@@ -29,7 +29,7 @@ START_TEST (elm_code_widget_token_render_simple_test)
    elm_code_file_line_token_add(file, 1, 6+1, 17+1, 
ELM_CODE_TOKEN_TYPE_COMMENT);
    elm_code_file_line_token_add(file, 1, 21+1, 22+1, 
ELM_CODE_TOKEN_TYPE_COMMENT);
 
-   _elm_code_widget_fill_line_tokens(cells, length+1, line);
+   _elm_code_widget_fill_line_tokens(NULL, cells, length+1, line);
    _assert_cell_type(cells[1], ELM_CODE_TOKEN_TYPE_DEFAULT, 1);
    _assert_cell_type(cells[4], ELM_CODE_TOKEN_TYPE_DEFAULT, 4);
    _assert_cell_type(cells[6], ELM_CODE_TOKEN_TYPE_DEFAULT, 6);

-- 


Reply via email to