Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/object Modified Files: ewl_object_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/object/ewl_object_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_object_test.c 4 Dec 2007 05:28:02 -0000 1.1 +++ ewl_object_test.c 8 Dec 2007 06:43:09 -0000 1.2 @@ -80,7 +80,7 @@ if (x == 11 && y == 23) ret = 1; else - snprintf(buf, len, "incorrect positions returned"); + LOG_FAILURE(buf, len, "incorrect positions returned"); ewl_widget_destroy(w); @@ -116,13 +116,13 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "preferred inner sizes match"); + LOG_FAILURE(buf, len, "preferred inner sizes match"); } else - snprintf(buf, len, "preferred inner sizes differ"); + LOG_FAILURE(buf, len, "preferred inner sizes differ"); } else - snprintf(buf, len, "default preferred inner size %dx%d", + LOG_FAILURE(buf, len, "default preferred inner size %dx%d", width, height); ewl_widget_destroy(w); @@ -159,13 +159,13 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "preferred sizes match"); + LOG_FAILURE(buf, len, "preferred sizes match"); } else - snprintf(buf, len, "preferred sizes differ"); + LOG_FAILURE(buf, len, "preferred sizes differ"); } else - snprintf(buf, len, "default preferred size %dx%d", + LOG_FAILURE(buf, len, "default preferred size %dx%d", width, height); ewl_widget_destroy(w); @@ -200,13 +200,13 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "minimum sizes match"); + LOG_FAILURE(buf, len, "minimum sizes match"); } else - snprintf(buf, len, "minimum sizes differ"); + LOG_FAILURE(buf, len, "minimum sizes differ"); } else - snprintf(buf, len, "default minimum size %dx%d", + LOG_FAILURE(buf, len, "default minimum size %dx%d", width, height); ewl_widget_destroy(w); @@ -241,13 +241,13 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "maximum sizes match"); + LOG_FAILURE(buf, len, "maximum sizes match"); } else - snprintf(buf, len, "maximum sizes differ"); + LOG_FAILURE(buf, len, "maximum sizes differ"); } else - snprintf(buf, len, "default maximum size %dx%d", + LOG_FAILURE(buf, len, "default maximum size %dx%d", width, height); ewl_widget_destroy(w); @@ -297,15 +297,15 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "min size ignored %dx%d", + LOG_FAILURE(buf, len, "min size ignored %dx%d", width, height); } else - snprintf(buf, len, "differing sizes wrong %dx%d", + LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", width, height); } else - snprintf(buf, len, "same sizes wrong %dx%d", width, height); + LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); ewl_widget_destroy(w); @@ -354,15 +354,15 @@ if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) ret = 1; else - snprintf(buf, len, "max size ignored %dx%d", + LOG_FAILURE(buf, len, "max size ignored %dx%d", width, height); } else - snprintf(buf, len, "differing sizes wrong %dx%d", + LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", width, height); } else - snprintf(buf, len, "same sizes wrong %dx%d", width, height); + LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); ewl_widget_destroy(w); @@ -383,14 +383,14 @@ ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); if (l || r || t || b) - snprintf(buf, len, "initial padding not 0"); + LOG_FAILURE(buf, len, "initial padding not 0"); else { ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); if (l == 1 && r == 2 && t == 3 && b == 4) ret = 1; else - snprintf(buf, len, "incorrect returned padding"); + LOG_FAILURE(buf, len, "incorrect returned padding"); } ewl_widget_destroy(w); @@ -412,14 +412,14 @@ ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); if (l || r || t || b) - snprintf(buf, len, "initial insets not 0"); + LOG_FAILURE(buf, len, "initial insets not 0"); else { ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4); ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); if (l == 1 && r == 2 && t == 3 && b == 4) ret = 1; else - snprintf(buf, len, "incorrect returned insets"); + LOG_FAILURE(buf, len, "incorrect returned insets"); } ewl_widget_destroy(w); @@ -447,7 +447,7 @@ height == (7 + EWL_OBJECT_MIN_SIZE)) ret = 1; else - snprintf(buf, len, "incorrect returned size %dx%d", width, + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, height); ewl_widget_destroy(w); @@ -474,7 +474,7 @@ if (width == 4 && height == 8) ret = 1; else - snprintf(buf, len, "incorrect returned size %dx%d", width, + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, height); ewl_widget_destroy(w); @@ -503,7 +503,7 @@ height == (10 + EWL_OBJECT_MIN_SIZE)) ret = 1; else - snprintf(buf, len, "incorrect returned size %dx%d", width, + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, height); ewl_widget_destroy(w); @@ -538,10 +538,10 @@ if (!fill) ret = 1; else - snprintf(buf, len, "fill none incorrect"); + LOG_FAILURE(buf, len, "fill none incorrect"); } else - snprintf(buf, len, "fill all missing flags"); + LOG_FAILURE(buf, len, "fill all missing flags"); ewl_widget_destroy(w); @@ -573,10 +573,10 @@ if (!align) ret = 1; else - snprintf(buf, len, "align none incorrect"); + LOG_FAILURE(buf, len, "align none incorrect"); } else - snprintf(buf, len, "alignment missing flags"); + LOG_FAILURE(buf, len, "alignment missing flags"); 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