aboutsummaryrefslogtreecommitdiffstats
path: root/test/cedet/tests/testnsp.cpp
diff options
context:
space:
mode:
authorChong Yidong2009-09-20 04:00:13 +0000
committerChong Yidong2009-09-20 04:00:13 +0000
commit17af2991b5bd71ed2d3d69fd4467e1fc8a31d8d1 (patch)
tree8ff33ff92ead70e1a3aeead0d1334b4aedac027b /test/cedet/tests/testnsp.cpp
parent00999a2ef0648870573dcb3a3866c6401db8bc28 (diff)
downloademacs-17af2991b5bd71ed2d3d69fd4467e1fc8a31d8d1.tar.gz
emacs-17af2991b5bd71ed2d3d69fd4467e1fc8a31d8d1.zip
Add Semantic unit tests.
Diffstat (limited to 'test/cedet/tests/testnsp.cpp')
-rw-r--r--test/cedet/tests/testnsp.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/cedet/tests/testnsp.cpp b/test/cedet/tests/testnsp.cpp
new file mode 100644
index 00000000000..00723c693cd
--- /dev/null
+++ b/test/cedet/tests/testnsp.cpp
@@ -0,0 +1,28 @@
1// Test NSP (Name space parent)
2//
3// Test dereferencing parents based on local parent scope.
4//
5// Derived from data David Engster provided.
6
7namespace nsp {
8
9 class rootclass {
10 public:
11 int fromroot() {};
12 };
13
14}
15
16namespace nsp {
17 class childclass : public rootclass {
18 public:
19 int fromchild() {};
20 };
21}
22
23void myfcn_not_in_ns (void) {
24 nsp::childclass test;
25
26 test.// -1-
27 ; // #1# ( "fromchild" "fromroot" )
28}