Forgot a file
authorDaniel Berlin <dberlin@dberlin.org>
Mon, 12 Jun 2000 01:31:41 +0000 (01:31 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Mon, 12 Jun 2000 01:31:41 +0000 (01:31 +0000)
gdb/testsuite/gdb.c++/Makefile.in
gdb/testsuite/gdb.c++/namespace.cc [new file with mode: 0644]

index ee8e263..8267259 100644 (file)
@@ -3,7 +3,7 @@ srcdir = @srcdir@
 
 EXECUTABLES = ambiguous annota2 anon-union cplusfuncs cttiadd \
        derivation inherit local member-ptr method misc \
-        overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace
+        overload ovldbreak ref-typ ref-typ2 templates userdef virtfunc namespace ref-types
 
 all: 
        @echo "Nothing to be done for all..."
diff --git a/gdb/testsuite/gdb.c++/namespace.cc b/gdb/testsuite/gdb.c++/namespace.cc
new file mode 100644 (file)
index 0000000..7667266
--- /dev/null
@@ -0,0 +1,103 @@
+namespace AAA {
+  char c;
+  int i;
+  int A_xyzq (int);
+  char xyzq (char);
+  class inA {
+  public:
+    int xx;
+    int fum (int);
+  };
+};
+
+int AAA::inA::fum (int i)
+{
+  return 10 + i;
+}
+
+namespace BBB {
+  char c;
+  int i;
+  int B_xyzq (int);
+  char xyzq (char);
+
+  namespace CCC {
+    char xyzq (char);
+  };
+
+  class Class {
+  public:
+    char xyzq (char);
+    int dummy;
+  };
+};
+
+int AAA::A_xyzq (int x)
+{
+  return 2 * x;
+}
+
+char AAA::xyzq (char c)
+{
+  return 'a';
+}
+
+
+int BBB::B_xyzq (int x)
+{
+  return 3 * x;
+}
+
+char BBB::xyzq (char c)
+{
+  return 'b';
+}
+
+char BBB::CCC::xyzq (char c)
+{
+  return 'z';
+}
+
+char BBB::Class::xyzq (char c)
+{
+  return 'o';
+}
+
+void marker1(void)
+{
+  return;
+}
+
+
+int main ()
+{
+  using AAA::inA;
+  char c1;
+
+  using namespace BBB;
+  
+  c1 = xyzq ('x');
+  c1 = AAA::xyzq ('x');
+  c1 = BBB::CCC::xyzq ('m');
+  
+  inA ina;
+
+  ina.xx = 33;
+
+  int y;
+
+  y = AAA::A_xyzq (33);
+  y += B_xyzq (44);
+
+  BBB::Class cl;
+
+  c1 = cl.xyzq('e');
+
+  marker1();
+  
+}
+
+  
+
+
+