From: xscript Date: Fri, 29 Apr 2011 00:32:56 +0000 (+0200) Subject: Move tests in cedet/semantic X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf84fd5bc5013037be4d6bf21d2ac8df0397cbfd;p=emacs.git Move tests in cedet/semantic --- 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 00000000000..f2ed0e4af39 --- /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" ) +}