Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/callback Modified Files: ewl_callback_test.c Log Message: - convert most of the unit tests to LOG_FAILURE. rest will be converted by RbdPngn in a separate commit =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/callback/ewl_callback_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_callback_test.c 4 Dec 2007 05:27:58 -0000 1.1 +++ ewl_callback_test.c 8 Dec 2007 06:43:08 -0000 1.2 @@ -108,7 +108,7 @@ if (id) ret = 1; else - snprintf(buf, len, "invalid callback id returned"); + LOG_FAILURE(buf, len, "invalid callback id returned"); ewl_widget_destroy(w); @@ -132,7 +132,7 @@ if (id) ret = 1; else - snprintf(buf, len, "invalid callback id returned"); + LOG_FAILURE(buf, len, "invalid callback id returned"); ewl_widget_destroy(w); @@ -158,7 +158,7 @@ if (id) ret = 1; else - snprintf(buf, len, "invalid callback id returned"); + LOG_FAILURE(buf, len, "invalid callback id returned"); ewl_widget_destroy(w); @@ -184,7 +184,7 @@ if (id == id2) ret = 1; else - snprintf(buf, len, "callback id's don't match"); + LOG_FAILURE(buf, len, "callback id's don't match"); ewl_widget_destroy(w); @@ -214,11 +214,11 @@ if (id != id2) ret = 1; else - snprintf(buf, len, "callback with different functions" + LOG_FAILURE(buf, len, "callback with different functions" " id's match"); } else - snprintf(buf, len, "callback with different data id's match"); + LOG_FAILURE(buf, len, "callback with different data id's match"); ewl_widget_destroy(w); @@ -242,7 +242,7 @@ if ((long)ewl_widget_data_get(w, w) != 1) ret = 1; else - snprintf(buf, len, "del failed to remove callback"); + LOG_FAILURE(buf, len, "del failed to remove callback"); ewl_widget_destroy(w); @@ -267,7 +267,7 @@ if ((long)ewl_widget_data_get(w, w) != 1) ret = 1; else - snprintf(buf, len, "del_type failed to remove callback"); + LOG_FAILURE(buf, len, "del_type failed to remove callback"); ewl_widget_destroy(w); @@ -292,7 +292,7 @@ if ((long)ewl_widget_data_get(w, w) != 1) ret = 1; else - snprintf(buf, len, "clear failed to remove callback"); + LOG_FAILURE(buf, len, "clear failed to remove callback"); ewl_widget_destroy(w); @@ -316,7 +316,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -340,7 +340,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -365,7 +365,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -390,7 +390,7 @@ if ((long)ewl_widget_data_get(w, w) != 1) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); @@ -418,7 +418,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -446,7 +446,7 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); @@ -476,7 +476,7 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -506,7 +506,7 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); @@ -534,7 +534,7 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -553,7 +553,7 @@ if (CALLBACK_CUSTOM_TYPE > EWL_CALLBACK_MAX) ret = 1; else - snprintf(buf, len, "callback type registration failed"); + LOG_FAILURE(buf, len, "callback type registration failed"); return ret; } @@ -570,7 +570,7 @@ if (CALLBACK_CUSTOM_TYPE != CALLBACK_CUSTOM_TYPE2) ret = 1; else - snprintf(buf, len, "callback type not unique"); + LOG_FAILURE(buf, len, "callback type not unique"); return ret; } @@ -591,7 +591,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -614,7 +614,7 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -639,7 +639,7 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -663,7 +663,7 @@ if ((long)ewl_widget_data_get(w, w) == 0) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); @@ -695,10 +695,10 @@ if ((long)ewl_widget_data_get(w, w) == 1) ret = 1; else - snprintf(buf, len, "first callback function called"); + LOG_FAILURE(buf, len, "first callback function called"); } else - snprintf(buf, len, "second callback function called"); + LOG_FAILURE(buf, len, "second callback function called"); ewl_widget_destroy(w); @@ -722,7 +722,7 @@ if ((long)ewl_widget_data_get(w, w) == 0) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); @@ -750,10 +750,10 @@ if ((long)ewl_widget_data_get(w, w) == 2) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); } else - snprintf(buf, len, "callback function not called"); + LOG_FAILURE(buf, len, "callback function not called"); ewl_widget_destroy(w); @@ -777,7 +777,7 @@ if ((long)ewl_widget_data_get(w, w) == 0) ret = 1; else - snprintf(buf, len, "callback function called"); + LOG_FAILURE(buf, len, "callback function called"); ewl_widget_destroy(w); ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs