Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/mvc Modified Files: ewl_mvc_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/mvc/ewl_mvc_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_mvc_test.c 4 Dec 2007 05:28:02 -0000 1.1 +++ ewl_mvc_test.c 8 Dec 2007 06:43:09 -0000 1.2 @@ -141,13 +141,13 @@ if (idx->sel.type != EWL_SELECTION_TYPE_INDEX) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } if ((idx->row != 1) || (idx->column != 2)) { - snprintf(buf, len, "Incorrect row/column setting: " + LOG_FAILURE(buf, len, "Incorrect row/column setting: " "(%d %d) vs (1, 2)", idx->row, idx->column); return FALSE; } @@ -173,13 +173,13 @@ if (idx->sel.type != EWL_SELECTION_TYPE_INDEX) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } if ((idx->row != 1) || (idx->column != 2)) { - snprintf(buf, len, "Incorrect row/column setting " + LOG_FAILURE(buf, len, "Incorrect row/column setting " "(%d %d) instead of (1, 2)", idx->row, idx->column); return FALSE; } @@ -202,13 +202,13 @@ if (idx->sel.type != EWL_SELECTION_TYPE_INDEX) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } if ((idx->row != 1) || (idx->column != 2)) { - snprintf(buf, len, "Incorrect start row/column setting"); + LOG_FAILURE(buf, len, "Incorrect start row/column setting"); return FALSE; } @@ -231,25 +231,25 @@ if (!idx) { - snprintf(buf, len, "Returned idx is NULL"); + LOG_FAILURE(buf, len, "Returned idx is NULL"); return FALSE; } if (idx->sel.type != EWL_SELECTION_TYPE_RANGE) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } if ((idx->start.row != 1) || (idx->start.column != 2)) { - snprintf(buf, len, "Incorrect start row/column setting"); + LOG_FAILURE(buf, len, "Incorrect start row/column setting"); return FALSE; } if ((idx->end.row != 6) || (idx->end.column != 8)) { - snprintf(buf, len, "Incorrect end row/column setting"); + LOG_FAILURE(buf, len, "Incorrect end row/column setting"); return FALSE; } @@ -276,7 +276,7 @@ count = ewl_mvc_selected_count_get(m); if (count != expected) { - snprintf(buf, len, "Incorrect count (%d instead of %d)", + LOG_FAILURE(buf, len, "Incorrect count (%d instead of %d)", count, expected); return FALSE; } @@ -297,7 +297,7 @@ if (!ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 6, 8)) { - snprintf(buf, len, "Not selected"); + LOG_FAILURE(buf, len, "Not selected"); return FALSE; } @@ -317,7 +317,7 @@ if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 7, 7)) { - snprintf(buf, len, "Item selected"); + LOG_FAILURE(buf, len, "Item selected"); return FALSE; } @@ -338,7 +338,7 @@ if (!ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 4, 5)) { - snprintf(buf, len, "Not selected"); + LOG_FAILURE(buf, len, "Not selected"); return FALSE; } @@ -359,7 +359,7 @@ if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 1)) { - snprintf(buf, len, "Item selected selected"); + LOG_FAILURE(buf, len, "Item selected selected"); return FALSE; } @@ -385,7 +385,7 @@ if (ewl_mvc_selected_count_get(m) != 0) { - snprintf(buf, len, "Selected list not empty."); + LOG_FAILURE(buf, len, "Selected list not empty."); return FALSE; } @@ -411,7 +411,7 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 9, 1); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 9, 1)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } @@ -437,7 +437,7 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 10, 2); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 10, 2)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } @@ -473,14 +473,14 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 2, 1); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 2, 1)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } count = ewl_mvc_selected_count_get(m); if (count != 1) { - snprintf(buf, len, "Selected items is %d instead of 1", count); + LOG_FAILURE(buf, len, "Selected items is %d instead of 1", count); return FALSE; } @@ -516,14 +516,14 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 1, 1); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 1)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } count = ewl_mvc_selected_count_get(m); if (count != 1) { - snprintf(buf, len, "Selected items is %d instead of 1", count); + LOG_FAILURE(buf, len, "Selected items is %d instead of 1", count); return FALSE; } @@ -556,13 +556,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 1, 1); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 1)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 1) { - snprintf(buf, len, "Incorrect number of selected items"); + LOG_FAILURE(buf, len, "Incorrect number of selected items"); return FALSE; } @@ -595,13 +595,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 1, 2); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 2)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 1) { - snprintf(buf, len, "Incorrect number of selected items"); + LOG_FAILURE(buf, len, "Incorrect number of selected items"); return FALSE; } @@ -635,13 +635,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 1, 2); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 2)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -679,13 +679,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 6, 8); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 6, 8)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -724,13 +724,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 4, 5); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 4, 5)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -777,13 +777,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 4, 2); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 4, 2)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -826,13 +826,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 3, 8); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 3, 8)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -875,13 +875,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 1, 5); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 1, 5)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -924,13 +924,13 @@ ewl_mvc_selected_rm(m, ewl_mvc_data_get(m), 6, 3); if (ewl_mvc_selected_is(m, ewl_mvc_data_get(m), 6, 3)) { - snprintf(buf, len, "Index still selected"); + LOG_FAILURE(buf, len, "Index still selected"); return FALSE; } if (ewl_mvc_selected_count_get(m) != 41) { - snprintf(buf, len, "Incorrect number of selected items: %d", + LOG_FAILURE(buf, len, "Incorrect number of selected items: %d", ewl_mvc_selected_count_get(m)); return FALSE; } @@ -1014,7 +1014,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1050,7 +1050,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1084,7 +1084,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1118,7 +1118,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1155,7 +1155,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1200,7 +1200,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1245,7 +1245,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1290,7 +1290,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1337,7 +1337,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1384,7 +1384,7 @@ count = ecore_list_count(m->selected); if (count != 3) { - snprintf(buf, len, "%d items in list instead of 3", count); + LOG_FAILURE(buf, len, "%d items in list instead of 3", count); return FALSE; } @@ -1429,7 +1429,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1466,7 +1466,7 @@ count = ecore_list_count(m->selected); if (count != 1) { - snprintf(buf, len, "%d items in list instead of 1", count); + LOG_FAILURE(buf, len, "%d items in list instead of 1", count); return FALSE; } @@ -1485,14 +1485,14 @@ if (sel->type != EWL_SELECTION_TYPE_INDEX) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } idx = EWL_SELECTION_IDX(sel); if (((int)idx->row != row) || ((int)idx->column != column)) { - snprintf(buf, len, "Incorrect indices in index " + LOG_FAILURE(buf, len, "Incorrect indices in index " "([%d %d] vs [%d %d])", idx->row, idx->column, row, column); @@ -1511,14 +1511,14 @@ if (sel->type != EWL_SELECTION_TYPE_RANGE) { - snprintf(buf, len, "Incorrect selection type"); + LOG_FAILURE(buf, len, "Incorrect selection type"); return FALSE; } rng = EWL_SELECTION_RANGE(sel); if (((int)rng->start.row != srow) || ((int)rng->start.column != scolumn)) { - snprintf(buf, len, "Start row/column incorrect " + LOG_FAILURE(buf, len, "Start row/column incorrect " "([%d %d] vs [%d %d])", rng->start.row, rng->start.column, srow, scolumn); @@ -1527,7 +1527,7 @@ if (((int)rng->end.row != erow) || ((int)rng->end.column != ecolumn)) { - snprintf(buf, len, "End row/column incorrect " + LOG_FAILURE(buf, len, "End row/column incorrect " "([%d %d] vs [%d %d])", rng->end.row, rng->end.column, erow, ecolumn); ------------------------------------------------------------------------- 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