emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/merge-cedet-tests bf84fd5 054/316: Move tests in c


From: Edward John Steere
Subject: [Emacs-diffs] scratch/merge-cedet-tests bf84fd5 054/316: Move tests in cedet/semantic
Date: Sat, 28 Jan 2017 09:09:47 +0000 (UTC)

branch: scratch/merge-cedet-tests
commit bf84fd5bc5013037be4d6bf21d2ac8df0397cbfd
Author: xscript <address@hidden>
Commit: Edward John Steere <address@hidden>

    Move tests in cedet/semantic
---
 test/manual/cedet/cedet/semantic/tests/testnsp.cpp |   59 ++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/test/manual/cedet/cedet/semantic/tests/testnsp.cpp 
b/test/manual/cedet/cedet/semantic/tests/testnsp.cpp
new file mode 100644
index 0000000..f2ed0e4
--- /dev/null
+++ b/test/manual/cedet/cedet/semantic/tests/testnsp.cpp
@@ -0,0 +1,59 @@
+// Test NSP (Name space parent)
+//
+// Test dereferencing parents based on local parent scope.
+//
+// Derived from data David Engster provided.
+
+namespace nsp {
+
+  class rootclass {
+  public:
+    int fromroot() {};
+  };
+
+}
+
+namespace nsp {
+  class childclass : public rootclass {
+  public:
+    int fromchild() {};
+  };
+}
+
+void myfcn_not_in_ns (void) {
+  nsp::childclass test;
+
+  test.// -1-
+    ; // #1# ( "fromchild" "fromroot" )
+}
+
+// Test a class declared in a class, where the contents
+// are in a qualified name.
+//
+// Thanks Michael Reiher for the concise example.
+
+class AAA
+{
+public:
+  AAA();
+
+  void aaa();
+
+private:
+    class Private;
+    Private * const d;
+};
+
+class AAA::Private
+{
+    Private() : bbb(0) {
+    }
+
+    BBB* bbb;
+};
+
+void AAA::aaa()
+{
+  d->// -2-
+    ; // #2# ( "bbb" )
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]