mirror of git://gcc.gnu.org/git/gcc.git
libiberty: disable logging of list content for doubly-linked list tests
When the doubly-linked list tests were introduced, the tests were printing the content of the list forward and backward. However, this printing is not needed outside of debugging, and confuses people because the output is not only composed of PASS: lines. This patch disables the printing of the list content by default. If one wants to re-enable it for debugging, he can set the macro DUMP_LIST to 1. libiberty/ChangeLog: * testsuite/test-doubly-linked-list.c: disable debug logging on stdout.
This commit is contained in:
parent
54edbeeaac
commit
0d0837df69
|
|
@ -155,19 +155,26 @@ bool check(const char *op,
|
|||
bool success = true;
|
||||
bool res;
|
||||
|
||||
l_print (wrapper->first);
|
||||
#define DUMP_LIST 0
|
||||
|
||||
if (DUMP_LIST)
|
||||
l_print (wrapper->first);
|
||||
|
||||
res = run_test (expect, wrapper, false);
|
||||
printf ("%s: test-linked-list::%s: check forward conformity\n",
|
||||
res ? "PASS": "FAIL", op);
|
||||
success &= res;
|
||||
|
||||
l_reverse_print (wrapper->last);
|
||||
if (DUMP_LIST)
|
||||
l_reverse_print (wrapper->last);
|
||||
|
||||
res = run_test (expect, wrapper, true);
|
||||
printf ("%s: test-linked-list::%s: check backward conformity\n",
|
||||
res ? "PASS": "FAIL", op);
|
||||
success &= res;
|
||||
|
||||
printf("\n");
|
||||
if (DUMP_LIST)
|
||||
printf("\n");
|
||||
|
||||
return success;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue