Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/button Modified Files: ewl_button_test.c Log Message: - tabs are a tricky beast. looks like I missed some. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/button/ewl_button_test.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_button_test.c 6 May 2008 20:09:02 -0000 1.7 +++ ewl_button_test.c 7 May 2008 13:38:14 -0000 1.8 @@ -25,18 +25,18 @@ static int image_fill_policy_test_set_get(char *buf, int len); static Ewl_Unit_Test button_unit_tests[] = { - {"label set/get", label_test_set_get, NULL, -1, 0}, - {"image null get", image_null_test_get, NULL, -1, 0}, - {"image null set/get", image_null_test_set_get, NULL, -1, 0}, - {"image nonexistent set/get", image_nonexist_relative_test_set_get, NULL, -1, 0}, - {"image size null height set/get", image_size_null_height_test_set_get, NULL, -1 , 0}, - {"image size null width set/get", image_size_null_width_test_set_get, NULL, -1, 0}, - {"image size match set/get", image_size_match_test_set_get, NULL, -1, 0}, - {"image size differ set/get", image_size_differ_test_set_get, NULL, -1, 0}, - {"image size max int set/get", image_size_max_int_test_set_get, NULL, -1, 0}, - {"image alignment set/get", image_alignment_test_set_get, NULL, -1, 0}, - {"image fill policy set/get", image_fill_policy_test_set_get, NULL, -1, 0}, - {NULL, NULL, NULL, -1, 0} + {"label set/get", label_test_set_get, NULL, -1, 0}, + {"image null get", image_null_test_get, NULL, -1, 0}, + {"image null set/get", image_null_test_set_get, NULL, -1, 0}, + {"image nonexistent set/get", image_nonexist_relative_test_set_get, NULL, -1, 0}, + {"image size null height set/get", image_size_null_height_test_set_get, NULL, -1 , 0}, + {"image size null width set/get", image_size_null_width_test_set_get, NULL, -1, 0}, + {"image size match set/get", image_size_match_test_set_get, NULL, -1, 0}, + {"image size differ set/get", image_size_differ_test_set_get, NULL, -1, 0}, + {"image size max int set/get", image_size_max_int_test_set_get, NULL, -1, 0}, + {"image alignment set/get", image_alignment_test_set_get, NULL, -1, 0}, + {"image fill policy set/get", image_fill_policy_test_set_get, NULL, -1, 0}, + {NULL, NULL, NULL, -1, 0} }; void @@ -44,9 +44,9 @@ { test->name = "Button"; test->tip = "The button class is a basic button\n" - "with a label. This class inherits from\n" - "the Ewl_Box to allow for placing any\n" - "other widgets inside the button."; + "with a label. This class inherits from\n" + "the Ewl_Box to allow for placing any\n" + "other widgets inside the button."; test->filename = __FILE__; test->func = create_test; test->type = EWL_TEST_TYPE_SIMPLE; @@ -131,7 +131,7 @@ */ check_button[1] = ewl_checkbutton_new(); ewl_button_label_set(EWL_BUTTON(check_button[1] ), - "With Label and checked"); + "With Label and checked"); ewl_checkbutton_checked_set(EWL_CHECKBUTTON(check_button[1]), TRUE); ewl_container_child_append(EWL_CONTAINER(vbox), check_button[1]); ewl_widget_show(check_button[1]); @@ -178,7 +178,7 @@ radio_button[1] = ewl_radiobutton_new(); ewl_radiobutton_chain_set(EWL_RADIOBUTTON(radio_button[1]), - EWL_RADIOBUTTON(radio_button[0])); + EWL_RADIOBUTTON(radio_button[0])); ewl_container_child_append(EWL_CONTAINER(vbox), radio_button[1]); ewl_widget_show(radio_button[1]); @@ -202,14 +202,14 @@ ewl_button_label_set(EWL_BUTTON(button), "my_label"); if (!strcmp("my_label", ewl_button_label_get(EWL_BUTTON(button)))) { - ewl_button_label_set(EWL_BUTTON(button), NULL); - if (ewl_button_label_get(EWL_BUTTON(button))) - LOG_FAILURE(buf, len, "label_get not NULL"); - else - ret = 1; + ewl_button_label_set(EWL_BUTTON(button), NULL); + if (ewl_button_label_get(EWL_BUTTON(button))) + LOG_FAILURE(buf, len, "label_get not NULL"); + else + ret = 1; } else - LOG_FAILURE(buf, len, "label_get doesn't match label_set"); + LOG_FAILURE(buf, len, "label_get doesn't match label_set"); ewl_widget_destroy(button); @@ -225,9 +225,9 @@ button = ewl_button_new(); if (ewl_button_image_get(EWL_BUTTON(button))) - LOG_FAILURE(buf, len, "image_get not NULL"); + LOG_FAILURE(buf, len, "image_get not NULL"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -246,9 +246,9 @@ ewl_button_image_set(EWL_BUTTON(button), NULL, NULL); val = ewl_button_image_get(EWL_BUTTON(button)); if (val) - LOG_FAILURE(buf, len, "image_get %s when set to NULL", val); + LOG_FAILURE(buf, len, "image_get %s when set to NULL", val); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -265,9 +265,9 @@ ewl_button_image_set(EWL_BUTTON(button), "my_image", NULL); if (strcmp("my_image", ewl_button_image_get(EWL_BUTTON(button)))) - LOG_FAILURE(buf, len, "image_get dosen't match image_set"); + LOG_FAILURE(buf, len, "image_get dosen't match image_set"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -285,9 +285,9 @@ ewl_button_image_size_get(EWL_BUTTON(button), &w, NULL); if (w != 0) - LOG_FAILURE(buf, len, "image_size_get width not 0"); + LOG_FAILURE(buf, len, "image_size_get width not 0"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -305,9 +305,9 @@ ewl_button_image_size_get(EWL_BUTTON(button), NULL, &h); if (h != 0) - LOG_FAILURE(buf, len, "image_size_get height not 0"); + LOG_FAILURE(buf, len, "image_size_get height not 0"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -326,9 +326,9 @@ ewl_button_image_size_set(EWL_BUTTON(button), 32, 32); ewl_button_image_size_get(EWL_BUTTON(button), &w, &h); if (w != 32 || h != 32) - LOG_FAILURE(buf, len, "image_size_get width and height don't match"); + LOG_FAILURE(buf, len, "image_size_get width and height don't match"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -346,9 +346,9 @@ ewl_button_image_size_set(EWL_BUTTON(button), 30, 24); ewl_button_image_size_get(EWL_BUTTON(button), &w, &h); if (w != 30 || h != 24) - LOG_FAILURE(buf, len, "image_size_get width and height don't differ"); + LOG_FAILURE(buf, len, "image_size_get width and height don't differ"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -366,9 +366,9 @@ ewl_button_image_size_set(EWL_BUTTON(button), INT_MAX, INT_MAX); ewl_button_image_size_get(EWL_BUTTON(button), &w, &h); if (w != INT_MAX|| h != INT_MAX) - LOG_FAILURE(buf, len, "image_size_get width and height not INT_MAX"); + LOG_FAILURE(buf, len, "image_size_get width and height not INT_MAX"); else - ret = 1; + ret = 1; ewl_widget_destroy(button); @@ -387,16 +387,16 @@ align = ewl_button_alignment_get(EWL_BUTTON(button)); if (align == EWL_FLAG_ALIGN_RIGHT) { - ewl_button_alignment_set(EWL_BUTTON(button), - EWL_FLAG_ALIGN_TOP); - align = ewl_button_alignment_get(EWL_BUTTON(button)); - if (align == EWL_FLAG_ALIGN_TOP) - ret = 1; - else - LOG_FAILURE(buf, len, "image alignment not top"); + ewl_button_alignment_set(EWL_BUTTON(button), + EWL_FLAG_ALIGN_TOP); + align = ewl_button_alignment_get(EWL_BUTTON(button)); + if (align == EWL_FLAG_ALIGN_TOP) + ret = 1; + else + LOG_FAILURE(buf, len, "image alignment not top"); } else - LOG_FAILURE(buf, len, "image alignment not right"); + LOG_FAILURE(buf, len, "image alignment not right"); ewl_widget_destroy(button); @@ -415,16 +415,16 @@ align = ewl_button_fill_policy_get(EWL_BUTTON(button)); if (align == EWL_FLAG_FILL_NONE) { - ewl_button_fill_policy_set(EWL_BUTTON(button), - EWL_FLAG_FILL_FILL); - align = ewl_button_fill_policy_get(EWL_BUTTON(button)); - if (align == EWL_FLAG_FILL_FILL) - ret = 1; - else - LOG_FAILURE(buf, len, "image fill policy not fill"); + ewl_button_fill_policy_set(EWL_BUTTON(button), + EWL_FLAG_FILL_FILL); + align = ewl_button_fill_policy_get(EWL_BUTTON(button)); + if (align == EWL_FLAG_FILL_FILL) + ret = 1; + else + LOG_FAILURE(buf, len, "image fill policy not fill"); } else - LOG_FAILURE(buf, len, "image fill policy not none"); + LOG_FAILURE(buf, len, "image fill policy not none"); ewl_widget_destroy(button); ------------------------------------------------------------------------- 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