Skip to content
Snippets Groups Projects
Commit c246c4bc authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

genmatch: Add selftests to genmatch for diag_vfprintf

The following patch adds selftests to genmatch to verify the new printing
routine there.
So that I can rely on HAVE_DECL_FMEMOPEN (host test), the tests are done
solely in stage2+ where we link the host libcpp etc. to genmatch.
The tests have been adjusted from pretty-print.cc (test_pp_format),
and I've added to that function two new tests because I've noticed nothing
was testing the %M$.*N$s etc. format specifiers.

2024-10-27  Jakub Jelinek  <jakub@redhat.com>

	* configure.ac (gcc_AC_CHECK_DECLS): Add fmemopen.
	* configure: Regenerate.
	* config.in: Regenerate.
	* Makefile.in (build/genmatch.o): Add -DGENMATCH_SELFTESTS to
	BUILD_CPPFLAGS for stage2+ genmatch.
	* genmatch.cc (test_diag_vfprintf, genmatch_diag_selftests): New
	functions.
	(main): Call genmatch_diag_selftests.
	* pretty-print.cc (test_pp_format): Add two tests, one for %M$.*N$s
	and one for %M$.Ns.
parent ad7d5cd6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment