Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/bin/tests/text


Modified Files:
        ewl_text_test.c 


Log Message:
- tabs are a tricky beast. looks like I missed some.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/text/ewl_text_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_text_test.c     6 May 2008 20:18:57 -0000       1.5
+++ ewl_text_test.c     7 May 2008 13:38:20 -0000       1.6
@@ -18,11 +18,11 @@
 static int text_invalid_utf8_set_get(char *buf, int len);
 
 static Ewl_Unit_Test text_unit_tests[] = {
-               {"text set/get", text_test_set_get, NULL, -1, 0},
-               {"valid UTF-8 text set/get", text_valid_utf8_set_get, NULL, -1, 
0},
-               {"invalid UTF-8 text set/get", text_invalid_utf8_set_get, NULL, 
-1, 0},
-               {"null text set/get", text_test_set_get_null, NULL, -1, 0},
-               {NULL, NULL, NULL, -1, 0}
+                {"text set/get", text_test_set_get, NULL, -1, 0},
+                {"valid UTF-8 text set/get", text_valid_utf8_set_get, NULL, 
-1, 0},
+                {"invalid UTF-8 text set/get", text_invalid_utf8_set_get, 
NULL, -1, 0},
+                {"null text set/get", text_test_set_get_null, NULL, -1, 0},
+                {NULL, NULL, NULL, -1, 0}
         };
 
 void
@@ -30,7 +30,7 @@
 {
         test->name = "Text";
         test->tip = "Defines a class for multi-line text layout\n"
-               "and formatting.";
+                "and formatting.";
         test->filename = __FILE__;
         test->func = create_test;
         test->type = EWL_TEST_TYPE_SIMPLE;
@@ -67,8 +67,8 @@
 
         printf("Styles set\n");
         ewl_text_styles_set(EWL_TEXT(o), EWL_TEXT_STYLE_DOUBLE_UNDERLINE
-                                               | EWL_TEXT_STYLE_OUTLINE
-                                               | EWL_TEXT_STYLE_SOFT_SHADOW);
+                                                | EWL_TEXT_STYLE_OUTLINE
+                                                | EWL_TEXT_STYLE_SOFT_SHADOW);
         printf("Double underline colour set\n");
         ewl_text_double_underline_color_set(EWL_TEXT(o), 50, 50, 50, 255);
 
@@ -92,16 +92,16 @@
         ewl_text_text_append(EWL_TEXT(o), "This is the link."); /* 17 */
 
         len = ewl_text_cursor_position_get(EWL_TEXT(o)) -
-                       ewl_text_trigger_start_pos_get(trigger);
+                        ewl_text_trigger_start_pos_get(trigger);
         ewl_text_trigger_length_set(trigger, len);
 
         ewl_container_child_append(EWL_CONTAINER(o), EWL_WIDGET(trigger));
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_UP,
-                       trigger_cb, "You clicked the trigger, have a cookie.");
+                        trigger_cb, "You clicked the trigger, have a cookie.");
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_IN,
-                       trigger_cb_mouse_in, NULL);
+                        trigger_cb_mouse_in, NULL);
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_OUT,
-                       trigger_cb_mouse_out, NULL);
+                        trigger_cb_mouse_out, NULL);
 
         printf("Inserting 'The fifth bunch of text\\n' [139]\n");
         ewl_text_text_insert(EWL_TEXT(o), "The fifth bunch of text\n", 0); /* 
24 */
@@ -143,16 +143,16 @@
         printf("Appending 'This is the multi\\n\\nline link.' [226]\n");
         ewl_text_text_append(EWL_TEXT(o), "This is the multi\n\nline link."); 
/* 29 */
         len = ewl_text_cursor_position_get(EWL_TEXT(o)) -
-                       ewl_text_trigger_start_pos_get(trigger);
+                        ewl_text_trigger_start_pos_get(trigger);
         ewl_text_trigger_length_set(trigger, len);
 
         ewl_container_child_append(EWL_CONTAINER(o), EWL_WIDGET(trigger));
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_UP,
-                       trigger_cb, "You clicked the multi-line trigger, have a 
coke.");
+                        trigger_cb, "You clicked the multi-line trigger, have 
a coke.");
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_IN,
-                       trigger_cb_mouse_in, NULL);
+                        trigger_cb_mouse_in, NULL);
         ewl_callback_append(EWL_WIDGET(trigger), EWL_CALLBACK_MOUSE_OUT,
-                       trigger_cb_mouse_out, NULL);
+                        trigger_cb_mouse_out, NULL);
 
         printf("Colour set\n");
         ewl_text_color_set(EWL_TEXT(o), 255, 0, 255, 255);
@@ -189,7 +189,7 @@
 
 static void
 trigger_cb_mouse_in(Ewl_Widget *w, void *ev __UNUSED__,
-                                       void *data __UNUSED__)
+                                        void *data __UNUSED__)
 {
         Ewl_Text_Trigger *t;
 
@@ -201,7 +201,7 @@
 
 static void
 trigger_cb_mouse_out(Ewl_Widget *w, void *ev __UNUSED__,
-                                       void *data __UNUSED__)
+                                        void *data __UNUSED__)
 {
         Ewl_Text_Trigger *t;
 
@@ -223,9 +223,9 @@
         t = ewl_text_text_get(EWL_TEXT(o));
 
         if (strcmp(t, "This is the test text."))
-               LOG_FAILURE(buf, len, "text_get did not match text_set.");
+                LOG_FAILURE(buf, len, "text_get did not match text_set.");
         else
-               ret = 1;
+                ret = 1;
 
         return ret;
 }
@@ -242,9 +242,9 @@
         t = ewl_text_text_get(EWL_TEXT(o));
 
         if (t)
-               LOG_FAILURE(buf, len, "text_get did not return null.");
+                LOG_FAILURE(buf, len, "text_get did not return null.");
         else
-               ret = 1;
+                ret = 1;
 
         return ret;
 }
@@ -254,8 +254,8 @@
 {
         Ewl_Widget *t;
         char text[] = "This a valid UTF-8 string, although it contains "
-                       "at the moment only 7-bit ascii code.\n"
-                       " This will be changed later!";
+                        "at the moment only 7-bit ascii code.\n"
+                        " This will be changed later!";
         const char * returned_text;
         unsigned char *utext;
 
@@ -271,9 +271,9 @@
         returned_text = ewl_text_text_get(EWL_TEXT(t));
 
         if (strcmp(text, returned_text)) {
-               LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
-                               "setting a US-ASCII string");
-               return FALSE;
+                LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
+                                "setting a US-ASCII string");
+                return FALSE;
         }
 
         ewl_text_clear(EWL_TEXT(t));
@@ -292,9 +292,9 @@
         returned_text = ewl_text_text_get(EWL_TEXT(t));
 
         if (strcmp(text, returned_text)) {
-               LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
-                               "setting a valid UTF-8 string");
-               return FALSE;
+                LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
+                                "setting a valid UTF-8 string");
+                return FALSE;
         }
         return TRUE;
 }
@@ -305,8 +305,8 @@
 {
         Ewl_Widget *t;
         char text[] = "This a valid UTF-8 string, although it contains "
-                       "at the moment only 7-bit ascii code.\n"
-                       " This will be changed later!";
+                        "at the moment only 7-bit ascii code.\n"
+                        " This will be changed later!";
         const char *returned_text;
         unsigned char *utext;
 
@@ -328,17 +328,17 @@
         returned_text = ewl_text_text_get(EWL_TEXT(t));
 
         if (!returned_text)
-               LOG_FAILURE(buf, len, "ewl_text_text_get() returned a NULL 
pointer");
+                LOG_FAILURE(buf, len, "ewl_text_text_get() returned a NULL 
pointer");
 
         else if (!strcmp(text, returned_text)
-               || returned_text[2] < 0
-               || returned_text[4] < 0
-               || returned_text[10] < 0
-               || returned_text[11] < 0)
+                || returned_text[2] < 0
+                || returned_text[4] < 0
+                || returned_text[10] < 0
+                || returned_text[11] < 0)
         {
-               LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
-                               "setting a invalid UTF-8 string");
-               return FALSE;
+                LOG_FAILURE(buf, len, "Incorrect UTF-8 validation during"
+                                "setting a invalid UTF-8 string");
+                return FALSE;
         }
         return TRUE;
 }



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to