aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Ludlam2019-10-27 20:36:17 -0400
committerStefan Monnier2019-10-31 19:03:47 -0400
commit31ed03020c458daabdd8feac741e276a1b7f723b (patch)
treeaf0d73387234dc10673731146eee65bb463fbc1f
parent0f7163ab89cc6158dbb7a382b67da5ce200f42f1 (diff)
downloademacs-31ed03020c458daabdd8feac741e276a1b7f723b.tar.gz
emacs-31ed03020c458daabdd8feac741e276a1b7f723b.zip
* test/manual/cedet/tests/testdoublens.cpp: Update from upstream
* 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>
-rw-r--r--test/manual/cedet/tests/testdoublens.cpp53
-rw-r--r--test/manual/cedet/tests/testdoublens.hpp6
2 files changed, 55 insertions, 4 deletions
diff --git a/test/manual/cedet/tests/testdoublens.cpp b/test/manual/cedet/tests/testdoublens.cpp
index 4d10644e447..9449f971104 100644
--- a/test/manual/cedet/tests/testdoublens.cpp
+++ b/test/manual/cedet/tests/testdoublens.cpp
@@ -39,12 +39,27 @@ namespace Name1 {
39 return 0; 39 return 0;
40 } 40 }
41 41
42 void Foo::publishStuff(int /* a */, int /* b */) // ^2^ 42 void Foo::publishStuff(int a, int b) // ^2^
43 { 43 {
44 int foo = a;
45 int bar = b;
44 } 46 }
45 47
46 void Foo::sendStuff(int /* a */, int /* b */) // ^3^ 48 // Test polymorphism on arg types. Note that order is
49 // mixed to maximize failure cases
50 void Foo::publishStuff(char a, char b) // ^4^
47 { 51 {
52 int foo = a;
53 int bar = b;
54 }
55
56 void Foo::sendStuff(int a, int b) // ^3^
57 {
58 int foo = a;
59 int bar = b;
60
61 Foo::publishStuff(1,2)
62
48 } 63 }
49 64
50 } // namespace Name2 65 } // namespace Name2
@@ -163,3 +178,37 @@ namespace d {
163 178
164 } // namespace f 179 } // namespace f
165} // namespace d 180} // namespace d
181
182// Fully qualified const struct function arguments
183class ContainsStruct
184{
185 struct TheStruct
186 {
187 int memberOne;
188 int memberTwo;
189 };
190};
191
192void someFunc(const struct ContainsStruct::TheStruct *foo)
193{
194 foo->// -9-
195 // #9# ("memberOne" "memberTwo")
196}
197
198// Class with structure tag
199class ContainsNamedStruct
200{
201 struct _fooStruct
202 {
203 int memberOne;
204 int memberTwo;
205 } member;
206};
207
208void someOtherFunc(void)
209{
210 ContainsNamedStruct *someClass;
211 // This has to find ContainsNamedStruct::_fooStruct
212 someClass->member.// -10-
213 // #10# ("memberOne" "memberTwo")
214}
diff --git a/test/manual/cedet/tests/testdoublens.hpp b/test/manual/cedet/tests/testdoublens.hpp
index 507c8342b4c..907c4cbffc2 100644
--- a/test/manual/cedet/tests/testdoublens.hpp
+++ b/test/manual/cedet/tests/testdoublens.hpp
@@ -31,7 +31,9 @@ namespace Name1 {
31 int get(); 31 int get();
32 32
33 private: 33 private:
34 void publishStuff(int a, int b); 34 void publishStuff(char /* a */, char /* b */);
35
36 void publishStuff(int q, int r); // Purposely different names.
35 37
36 void sendStuff(int a, int b); 38 void sendStuff(int a, int b);
37 39
@@ -58,7 +60,7 @@ namespace a {
58 class Foo 60 class Foo
59 { 61 {
60 struct Dum { 62 struct Dum {
61 int diDum; 63 int diDum;
62 }; 64 };
63 65
64 protected: 66 protected: