binutils-gdb/gdb/testsuite/gdb.cp/gdb2384.cc
Andrew Burgess 6e89229742 gdb/testsuite: remove duplicate test names from gdb.cp/gdb2384.exp
The test gdb.cp/gdb2384.exp contains some duplicate test names, and
also some test names with a string inside parentheses at the end.  In
order to resolve the duplicates the obvious choice would be to add yet
more strings inside parentheses at the end of names, however, this is
discouraged in our test naming scheme.

The string in parentheses originates from a comment in the test source
code, which naturally leads to including this comment in the test
name.

In this commit I have changed the comment in the test source to remove
the string in parentheses, I then rename the tests in the .exp script
to match, making sure that all test names are unique.

There should be no change in test coverage after this commit.

gdb/testsuite/ChangeLog:

	* gdb.cp/gdb2384.cc (main): Change comments used for breakpoints.
	* gdb.cp/gdb2384.exp: Change and extend test names to avoid
	duplicates, and also to avoid having a string inside parentheses
	at the end of test names.
2021-03-26 14:04:16 +00:00

52 lines
1.1 KiB
C++

/* This testcase is part of GDB, the GNU debugger.
Copyright 2008-2021 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "gdb2384-base.h"
class derived1 : public base
{
public:
derived1 (int);
};
derived1::derived1 (int _x)
: base (_x)
{
}
class derived2 : public derived
{
public:
derived2 (int);
};
derived2::derived2 (int _x)
: derived (_x)
{
}
int g;
int
main ()
{
derived1 d1 (42);
derived2 d2 (24);
g = d1.meth (); // First breakpoint
g = d2.meth (); // Second breakpoint
return 0;
}