about summary refs log tree commit diff
path: root/support/support_test_compare_failure.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* support: Preserve errno in write_message, TEST_VERIFY and other checksFlorian Weimer2018-01-121-0/+3
| | | | | These facilities could clobber errno, which makes it difficult to write certain checks because a specific order has to be used.
* support: Increase usability of TEST_COMPAREFlorian Weimer2018-01-081-8/+8
| | | | | | | | | | | | | | | | | | | | | The previous implementation of the TEST_COMPARE macro would fail to compile code like this: int ret = res_send (query, sizeof (query), buf, sizeof (buf)); TEST_COMPARE (ret, sizeof (query) + 2 /* Compression reference. */ + 2 + 2 + 4 + 2 /* Type, class, TTL, RDATA length. */ + 1 /* Pascal-style string length. */ + strlen (expected_name)); This resulted in a failed static assertion, "integer conversions may alter sign of operands". A user of the TEST_COMPARE would have to add a cast to fix this. This patch reverts to the original proposed solution of a run-time check, making TEST_COMPARE usable for comparisons of numbers with types with different signedness in more contexts.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* support: Add TEST_COMPARE macroFlorian Weimer2017-12-041-0/+55