Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/combo
Modified Files:
ewl_combo_test.c
Log Message:
add more constructure unit tests
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/combo/ewl_combo_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_combo_test.c 7 May 2008 13:38:15 -0000 1.5
+++ ewl_combo_test.c 28 Jul 2008 00:47:49 -0000 1.6
@@ -35,6 +35,14 @@
unsigned int row,
unsigned int col);
+/* unit tests */
+static int constructor_test(char *buf, int len);
+
+static Ewl_Unit_Test combo_unit_tests[] = {
+ {"constructor", constructor_test, NULL, -1, 0},
+ {NULL, NULL, NULL, -1, 0}
+ };
+
void
test_info(Ewl_Test *test)
{
@@ -45,6 +53,7 @@
test->filename = __FILE__;
test->func = create_test;
test->type = EWL_TEST_TYPE_MISC;
+ test->unit_tests = combo_unit_tests;
}
static int
@@ -349,5 +358,32 @@
void *data __UNUSED__)
{
printf("value changed to (%s)\n", ewl_text_text_get(EWL_TEXT(w)));
+}
+
+static int
+constructor_test(char *buf, int len)
+{
+ Ewl_Widget *c;
+ int ret = 0;
+
+ c = ewl_combo_new();
+
+ if (!EWL_COMBO_IS(c))
+ {
+ LOG_FAILURE(buf, len, "returned widget is not of the type "
+ EWL_COMBO_TYPE);
+ goto DONE;
+ }
+ if (!!strcmp(ewl_widget_appearance_get(c), EWL_COMBO_TYPE))
+ {
+ LOG_FAILURE(buf, len, "combo has a wrong appearance");
+ goto DONE;
+ }
+
+ ret = 1;
+DONE:
+ ewl_widget_destroy(c);
+
+ return ret;
}
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs