selftest: introduce class auto_fix_quotes
commit00f7ba0313c2e368e1d3763e8c42f9d1c2fe888e
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2018 20:05:21 +0000 (2 20:05 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Jul 2018 20:05:21 +0000 (2 20:05 +0000)
tree2cefe7783c5b50896e82533f6e80f65347c8ef70
parent770f6f2a920e78ea94b6aedb1b9d82002f98f293
selftest: introduce class auto_fix_quotes

This patch moves a workaround for locale differences from a
selftest in pretty-print.c to selftest.h/c to make it reusable; I need
this for a selftest in a followup patch.

gcc/ChangeLog:
* pretty-print.c (selftest::test_pp_format): Move save and restore
of quotes to class auto_fix_quotes, and add an instance.
* selftest.c: Include "intl.h".
(selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
(selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
* selftest.h (selftest::auto_fix_quotes): New class.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262317 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/pretty-print.c
gcc/selftest.c
gcc/selftest.h