]> git.eshelyaron.com Git - emacs.git/commitdiff
Move tests in cedet/semantic
authorxscript <xscript@users.sourceforge.net>
Fri, 29 Apr 2011 00:32:56 +0000 (02:32 +0200)
committerEdward John Steere <edward.steere@gmail.com>
Wed, 25 Jan 2017 15:47:55 +0000 (17:47 +0200)
test/manual/cedet/cedet/semantic/tests/testfriends.cpp [new file with mode: 0644]

diff --git a/test/manual/cedet/cedet/semantic/tests/testfriends.cpp b/test/manual/cedet/cedet/semantic/tests/testfriends.cpp
new file mode 100644 (file)
index 0000000..f84ed5a
--- /dev/null
@@ -0,0 +1,37 @@
+// Test parsing of friends and how they are used in completion.
+/*
+  >>  Thanks Damien Profeta for the nice example.
+  >
+  >  I paste a small example.
+  >  It would be great if friend can be well parsed and even greater if
+  >  class B can access to all the members of A.
+*/
+
+class Af // %2% ( ( "testfriends.cpp" ) ( "Af" "B::testB" ) )
+{
+public:
+  int pubVar;
+private:
+  int privateVar;
+
+  friend class B;
+
+};
+
+class B
+{
+public:
+  int testB();
+  int testAB();
+
+};
+
+
+int B::testB() {
+  Af classA;
+  classA.//-1-
+    ; //#1# ( "privateVar" "pubVar" )
+}
+
+int B::testAB() { // %1% ( ( "testfriends.cpp" ) ( "B" "B::testAB" ) )
+}