Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin


Modified Files:
        Ewl_Test.h main.c 


Log Message:
- tests don't have to have a ui component if they are test type UNIT
- add ewl_widget.c test file

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/Ewl_Test.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Ewl_Test.h  10 Mar 2006 04:05:41 -0000      1.1
+++ Ewl_Test.h  10 Mar 2006 18:36:44 -0000      1.2
@@ -15,7 +15,8 @@
        EWL_TEST_TYPE_SIMPLE,
        EWL_TEST_TYPE_ADVANCED,
        EWL_TEST_TYPE_CONTAINER,
-       EWL_TEST_TYPE_MISC
+       EWL_TEST_TYPE_MISC,
+       EWL_TEST_TYPE_UNIT
 };
 typedef enum Ewl_Test_Type Ewl_Test_Type;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/main.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- main.c      10 Mar 2006 07:07:28 -0000      1.13
+++ main.c      10 Mar 2006 18:36:44 -0000      1.14
@@ -182,18 +182,19 @@
 
        t = data;
 
-       /* nothing to do if no ui test */
-       if (!t->func) return;
+       fill_source_text(t);
+       setup_unit_tests(t);
 
        c = ewl_widget_name_find("execute_box");
        ewl_container_reset(EWL_CONTAINER(c));
-       t->func(EWL_CONTAINER(c));
+
+       if (t->type != EWL_TEST_TYPE_UNIT)
+               t->func(EWL_CONTAINER(c));
+       else
+               c = ewl_widget_name_find("unit_test_box");
 
        n = ewl_widget_name_find("notebook");
        ewl_notebook_visible_page_set(EWL_NOTEBOOK(n), c);
-
-       fill_source_text(t);
-       setup_unit_tests(t);
 }
 
 static int
@@ -270,9 +271,9 @@
 {
        Ewl_Test *t;
        Ewl_Widget *menubar, *note, *tree, *o, *o2;
-       Ewl_Widget *sim, *adv, *misc, *container;
+       Ewl_Widget *sim, *adv, *misc, *container, *unit;
        char *entries[1];
-       char *headers[] = {"Test", "Pass/Fail", "Reason"};
+       char *headers[] = {"Test", "Status", "Failure Reason"};
 
        menubar = ewl_hmenubar_new();
        ewl_container_child_append(EWL_CONTAINER(box), menubar);
@@ -336,6 +337,9 @@
        entries[0] = "Misc";
        misc = ewl_tree_text_row_add(EWL_TREE(tree), NULL, entries);
 
+       entries[0] = "Unit";
+       unit = ewl_tree_text_row_add(EWL_TREE(tree), NULL, entries);
+
        /* add the tests to the category rows */
        ecore_list_goto_first(tests);
        while ((t = ecore_list_next(tests)))
@@ -351,6 +355,8 @@
                        parent = container;
                else if (t->type == EWL_TEST_TYPE_MISC)
                        parent = misc;
+               else if (t->type == EWL_TEST_TYPE_UNIT)
+                       parent = unit;
 
                w = ewl_tree_text_row_add(EWL_TREE(tree), 
                                        EWL_ROW(parent), entries);
@@ -377,6 +383,7 @@
        o = ewl_vbox_new();
        ewl_container_child_append(EWL_CONTAINER(note), o);
        ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(note), o, "Unit Tests");
+       ewl_widget_name_set(o, "unit_test_box");
        ewl_widget_show(o);
 
        o2 = ewl_tree_new(3);




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to