From 0a0dd2725479e5e19c58cfc27effa76041e8d321 Mon Sep 17 00:00:00 2001 From: Eric Ludlam Date: Mon, 24 Nov 2014 12:38:04 -0500 Subject: [PATCH] Test typedef which has the keyword "class" included * test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp: (NS2::Myclass, MyClassHandle, dixon): New test w/ a typedef that has keyword "class" included, instead of omitted as with other tests. --- .../cedet/semantic/tests/testtypedefs.cpp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp b/test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp index daf7bb6060f..1fdc87f4ff4 100644 --- a/test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp +++ b/test/manual/cedet/cedet/semantic/tests/testtypedefs.cpp @@ -118,3 +118,33 @@ int func(void) ; // #7# ( "field_a" "field_b" ) return 0; } + + +// ------------------ +// Example from Dixon Ryan + + +namespace NS2 { + class MyClass { + + public: + void myFunction() { } + }; +} + +typedef class NS2::MyClass* MyClassHandle; + +int dixon ( void ) { + MyClassHandle mch = getMyClassHandle(); + NS2::MyClass* mcptr = getMyClassHandle(); + + mch-> // -8- + ; // #8# ( "myFunction" ) + + mcptr-> // -9- + ; // #9# ( "myFunction" ) + + deleteMyClassHandle(mch); + + return 0; +} -- 2.39.2