This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfa/testsuite] more tests in gdb.c++/m-static


In article <ro1fzxewlg8.fsf@jackfruit.Stanford.EDU>, David Carlton
<carlton@math.Stanford.EDU> writes:

> I've added some tests to gdb.c++/m-static that correspond to the
> patch in
> <http://sources.redhat.com/ml/gdb-patches/2002-08/msg00385.html>;
> patches below.

I've reworked these patches and the other two new testsuite files that
I posted to be a little better behaved: now the main() functions all
explicitly return 0, and they no longer set breakpoints based on line
numbers.  Here are the revised patches for m-static; I'll send
revised patches for pr-574 and printmethod next.

David Carlton
carlton@math.stanford.edu

2002-08-20  David Carlton  <carlton@math.stanford.edu>

	* gdb.c++/m-static.exp: Remove breakpoints depending on line
	numbers, and replace them by use of "next".
	Add test 4.
	* gdb.c++/m-static.cc: Add test 4.
	* gdb.c++/m-static.h: New file.
	* gdb.c++/m-static1.cc: New file.

Index: m-static.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/m-static.cc,v
retrieving revision 1.1
diff -u -p -r1.1 m-static.cc
--- m-static.cc	30 May 2002 19:09:47 -0000	1.1
+++ m-static.cc	22 Aug 2002 17:00:11 -0000
@@ -53,6 +53,10 @@ namespace __gnu_test
 
   template<typename T>
     gnu_obj_2<int> gnu_obj_3<T>::data(etruscan);
+
+  // 2002-08-16
+  // Test four.
+#include "m-static.h"
 } 
 
 // instantiate templates explicitly so their static members will exist
@@ -67,6 +71,7 @@ int main()
   gnu_obj_1		test1(egyptian, 4589);
   gnu_obj_2<long>	test2(roman);
   gnu_obj_3<long>	test3(greek);
+  gnu_obj_4		test4;
 
   return 0;
 }
Index: m-static.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/m-static.cc,v
retrieving revision 1.1
diff -u -p -r1.1 m-static.cc
--- m-static.cc	30 May 2002 19:09:47 -0000	1.1
+++ m-static.cc	16 Aug 2002 20:59:25 -0000
@@ -53,6 +53,10 @@ namespace __gnu_test
 
   template<typename T>
     gnu_obj_2<int> gnu_obj_3<T>::data(etruscan);
+
+  // 2002-08-16
+  // Test four.
+#include "m-static.h"
 } 
 
 // instantiate templates explicitly so their static members will exist
@@ -67,6 +71,7 @@ int main()
   gnu_obj_1		test1(egyptian, 4589);
   gnu_obj_2<long>	test2(roman);
   gnu_obj_3<long>	test3(greek);
+  gnu_obj_4		test4;
 
   return 0;
 }
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ m-static.h	Fri Aug 16 13:24:37 2002
@@ -0,0 +1,11 @@
+// 2002-08-16
+
+class gnu_obj_4
+{
+ public:
+  static const int elsewhere;
+  static const int nowhere;
+  // At some point, perhaps:
+  // static const int everywhere = 317;
+};
+
--- /dev/null	Thu Apr 11 07:25:15 2002
+++ m-static1.cc	Fri Aug 16 13:11:02 2002
@@ -0,0 +1,9 @@
+// 2002-08-16
+
+namespace __gnu_test {
+#include "m-static.h"
+}
+
+using namespace __gnu_test;
+
+const int gnu_obj_4::elsewhere = 221;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]