Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: David Carlton <carlton@math.stanford.edu>
To: gdb-patches@sources.redhat.com
Cc: carlton@math.stanford.edu, mec@shout.net
Subject: Re: [rfa/testsuite] more tests in gdb.c++/m-static
Date: Thu, 22 Aug 2002 10:09:00 -0000	[thread overview]
Message-ID: <ro1hehmrfd2.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <ro1fzxewlg8.fsf@jackfruit.Stanford.EDU>

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch for m-static.exp --]
[-- Type: text/x-patch, Size: 713 bytes --]

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;
 }

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: patch for m-static.cc --]
[-- Type: text/x-patch, Size: 713 bytes --]

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;
 }

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: new file: m-static.h --]
[-- Type: text/x-patch, Size: 280 bytes --]

--- /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;
+};
+

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: new file: m-static1.cc --]
[-- Type: text/x-patch, Size: 236 bytes --]

--- /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;

  parent reply	other threads:[~2002-08-22 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-16 14:19 David Carlton
2002-08-16 14:30 ` Daniel Jacobowitz
2002-08-16 14:37   ` David Carlton
2002-08-22 10:09 ` David Carlton [this message]
2002-08-22 10:23   ` David Carlton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ro1hehmrfd2.fsf@jackfruit.Stanford.EDU \
    --to=carlton@math.stanford.edu \
    --cc=gdb-patches@sources.redhat.com \
    --cc=mec@shout.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox