diff options
| author | Chong Yidong | 2009-09-28 23:23:31 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-09-28 23:23:31 +0000 |
| commit | 74ea13c1a8d63e4f4015e2b9e7e4336e546e7e4a (patch) | |
| tree | d895d7e93cf93022f48bd6d173f616f1bb4b99fc /test/cedet/tests/testnsp.cpp | |
| parent | b9de0a4665563f847bc7c94f8c89180bf2a9f6bd (diff) | |
| download | emacs-74ea13c1a8d63e4f4015e2b9e7e4336e546e7e4a.tar.gz emacs-74ea13c1a8d63e4f4015e2b9e7e4336e546e7e4a.zip | |
Add CEDET tests.
Diffstat (limited to 'test/cedet/tests/testnsp.cpp')
| -rw-r--r-- | test/cedet/tests/testnsp.cpp | 28 |
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 | |||
| 7 | namespace nsp { | ||
| 8 | |||
| 9 | class rootclass { | ||
| 10 | public: | ||
| 11 | int fromroot() {}; | ||
| 12 | }; | ||
| 13 | |||
| 14 | } | ||
| 15 | |||
| 16 | namespace nsp { | ||
| 17 | class childclass : public rootclass { | ||
| 18 | public: | ||
| 19 | int fromchild() {}; | ||
| 20 | }; | ||
| 21 | } | ||
| 22 | |||
| 23 | void myfcn_not_in_ns (void) { | ||
| 24 | nsp::childclass test; | ||
| 25 | |||
| 26 | test.// -1- | ||
| 27 | ; // #1# ( "fromchild" "fromroot" ) | ||
| 28 | } | ||