]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/manual/cedet/tests/testdoublens.cpp: Update from upstream
authorEric Ludlam <zappo@gnu.org>
Mon, 28 Oct 2019 00:36:17 +0000 (20:36 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 31 Oct 2019 23:03:47 +0000 (19:03 -0400)
* test/manual/cedet/tests/testdoublens.hpp:
Merge content from CEDET on SF with extended test points for use with
test/lisp/cedet/semantic-utest-ia.el
Author: Eric Ludlam <zappo@gnu.org>

test/manual/cedet/tests/testdoublens.cpp
test/manual/cedet/tests/testdoublens.hpp

index 4d10644e447dcf0b6b99b152d3da33cd8ade0a56..9449f9711048b5fb232cce14ac1d33dcff2d0c66 100644 (file)
@@ -39,12 +39,27 @@ namespace Name1 {
       return 0;
     }
 
-    void Foo::publishStuff(int /* a */, int /* b */) // ^2^
+    void Foo::publishStuff(int a, int b) // ^2^
     {
+      int foo = a;
+      int bar = b;
     }
 
-    void Foo::sendStuff(int /* a */, int /* b */) // ^3^
+    // Test polymorphism on arg types.  Note that order is
+    // mixed to maximize failure cases
+    void Foo::publishStuff(char a, char b) // ^4^
     {
+      int foo = a;
+      int bar = b;
+    }
+
+    void Foo::sendStuff(int a, int b) // ^3^
+    {
+      int foo = a;
+      int bar = b;
+
+      Foo::publishStuff(1,2)
+
     }
 
   } // namespace Name2
@@ -163,3 +178,37 @@ namespace d {
 
   } // namespace f
 } // namespace d
+
+// Fully qualified const struct function arguments
+class ContainsStruct
+{
+  struct TheStruct
+  {
+    int memberOne;
+    int memberTwo;
+  };
+};
+
+void someFunc(const struct ContainsStruct::TheStruct *foo)
+{
+  foo->// -9-
+    // #9# ("memberOne" "memberTwo")
+}
+
+// Class with structure tag
+class ContainsNamedStruct
+{
+  struct _fooStruct
+  {
+    int memberOne;
+    int memberTwo;
+  } member;
+};
+
+void someOtherFunc(void)
+{
+  ContainsNamedStruct *someClass;
+  // This has to find ContainsNamedStruct::_fooStruct
+  someClass->member.// -10-
+    // #10# ("memberOne" "memberTwo")
+}
index 507c8342b4c9a61758349c89fcf588da59fbb274..907c4cbffc2e2fbd7469e99b0642115767511029 100644 (file)
@@ -31,7 +31,9 @@ namespace Name1 {
       int get();
 
     private:
-      void publishStuff(int a, int b);
+      void publishStuff(char /* a */, char /* b */);
+
+      void publishStuff(int q, int r); // Purposely different names.
 
       void sendStuff(int a, int b);
 
@@ -58,7 +60,7 @@ namespace a {
     class Foo
     {
       struct Dum {
-        int diDum;
+       int diDum;
       };
 
     protected: