diff test/cedet/tests/testnsp.cpp @ 104494:e480034314ce

Add Semantic unit tests.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 20 Sep 2009 04:00:13 +0000
parents
children 7f4c7f5c0eba
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/cedet/tests/testnsp.cpp	Sun Sep 20 04:00:13 2009 +0000
@@ -0,0 +1,28 @@
+// 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" )
+}