-
- Downloads
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.
Showing
- gcc/Makefile.in 1 addition, 0 deletionsgcc/Makefile.in
- gcc/config.in 7 additions, 0 deletionsgcc/config.in
- gcc/configure 1 addition, 1 deletiongcc/configure
- gcc/configure.ac 1 addition, 1 deletiongcc/configure.ac
- gcc/genmatch.cc 134 additions, 0 deletionsgcc/genmatch.cc
- gcc/pretty-print.cc 8 additions, 0 deletionsgcc/pretty-print.cc
Loading
Please register or sign in to comment