This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Merge/shared string_printf and string_vprintf unit tests


On 10/18/2017 06:40 PM, John Baldwin wrote:
> On Monday, October 16, 2017 11:57:57 PM Pedro Alves wrote:
>> Merge the string_printf and string_vprintf tests, running them all
>> against both functions.
>>
>> gdb/ChangeLog:
>> 2017-10-16  Pedro Alves  <palves@redhat.com>
>>
>> 	* unittests/common-utils-selftests.c (format_func): New typedef.
>> 	(string_printf_tests, string_vprintf_tests): Tests factored out
>> 	and merged to ...
>> 	(test_format_func): ... this new function.
>> 	(string_printf_tests, string_vprintf_tests): Reimplement on top of
>> 	test_format_func.
> 
> Looks good to me.
> 

Thanks much for the review John.  I've pushed this in now, with a
tweak to add ATTRIBUTE_PRINTF where appropriate:

 typedef std::string (format_func) (const char *fmt, ...)
   ATTRIBUTE_PRINTF (1, 2);

 static void ATTRIBUTE_PRINTF (2, 3)
 string_vappendf_wrapper (std::string &str, const char *fmt, ...)

... after noticing Simon's recent similar change to this file
that meanwhile went in.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]