Ensure cooked_index_entry self-tests are run

While looking at code coverage for gdb, I noticed that the
cooked_index_entry self-tests were not run.  I tracked this down to a
formatting error in cooked-index-entry.c.

I suspect it might be better to use a macro to define these
initialization functions.  That would probably remove the possibility
for this kind of error.
This commit is contained in:
Tom Tromey
2025-05-22 10:46:50 -06:00
parent 52d8dcccc0
commit 2711e4754f

View File

@@ -234,7 +234,8 @@ cooked_index_entry::write_scope (struct obstack *storage,
}
void _initialize_dwarf2_entry ();
void _initialize_dwarf2_entry ()
void
_initialize_dwarf2_entry ()
{
#if GDB_SELF_TEST
selftests::register_test ("cooked_index_entry::compare", test_compare);