summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric Ludlam <zappo@gnu.org>2019-10-27 20:36:17 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2019-10-31 19:03:47 -0400
commit31ed03020c458daabdd8feac741e276a1b7f723b (patch)
treeaf0d73387234dc10673731146eee65bb463fbc1f /test
parent0f7163ab89cc6158dbb7a382b67da5ce200f42f1 (diff)
downloademacs-31ed03020c458daabdd8feac741e276a1b7f723b.tar.gz
* 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>
Diffstat (limited to 'test')
-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 {
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")
+}
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 {
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: