diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2017-10-27 21:46:49 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-10-27 21:46:49 -0400 |
commit | 32fa66eb88d029576cfd8f5698d0579662d2f045 (patch) | |
tree | 728e4349fca5572938db280059832212969a3dba /Makefile.def | |
parent | af5f32f82b0ece140641484d8178ead655f8a0a5 (diff) | |
download | gdb-32fa66eb88d029576cfd8f5698d0579662d2f045.zip gdb-32fa66eb88d029576cfd8f5698d0579662d2f045.tar.gz gdb-32fa66eb88d029576cfd8f5698d0579662d2f045.tar.bz2 |
Add tests for filename_language
The next patch touches the filename_language area, but I noticed there
is no test exercising that. This patch adds some selftests for
add_filename_language, deduce_language_from_filename and
set_ext_lang_command. Because these tests add entries to the global
filename_language_table vector, it is not possible to run them
successfully multiple times in a same GDB instance. They can
potentially interfere with each other for the same reason. I therefore
added the scoped_restore_filename_language_table class that is used to
make sure tests leave that global vector in the same state they found it
(it is replaced in the following patch by a simple scoped_restore).
gdb/ChangeLog:
* symfile.c: Include selftest.h.
(class scoped_restore_filename_language_table): New.
(test_filename_language): New test.
(test_set_ext_lang_command): New test.
(_initialize_symfile): Register tests.
Diffstat (limited to 'Makefile.def')
0 files changed, 0 insertions, 0 deletions