summaryrefslogtreecommitdiff
path: root/test/manual/cedet/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/manual/cedet/tests')
-rw-r--r--test/manual/cedet/tests/test-fmt.cpp108
-rw-r--r--test/manual/cedet/tests/test-fmt.el65
-rw-r--r--test/manual/cedet/tests/test.el5
-rw-r--r--test/manual/cedet/tests/test.mk18
-rw-r--r--test/manual/cedet/tests/test.srt64
-rw-r--r--test/manual/cedet/tests/test.texi40
-rw-r--r--test/manual/cedet/tests/testdoublens.cpp214
-rw-r--r--test/manual/cedet/tests/testdoublens.hpp71
-rw-r--r--test/manual/cedet/tests/testfriends.cpp38
-rw-r--r--test/manual/cedet/tests/testjavacomp.java77
-rw-r--r--test/manual/cedet/tests/testlocalvars.cpp54
-rw-r--r--test/manual/cedet/tests/testnsp.cpp122
-rw-r--r--test/manual/cedet/tests/testsppcomplete.c66
-rw-r--r--test/manual/cedet/tests/teststruct.cpp86
-rw-r--r--test/manual/cedet/tests/testsubclass.cpp248
-rw-r--r--test/manual/cedet/tests/testsubclass.hh190
-rw-r--r--test/manual/cedet/tests/testtemplates.cpp149
-rw-r--r--test/manual/cedet/tests/testtypedefs.cpp155
-rw-r--r--test/manual/cedet/tests/testusing.cpp265
-rw-r--r--test/manual/cedet/tests/testusing.hh176
-rw-r--r--test/manual/cedet/tests/testvarnames.c104
-rw-r--r--test/manual/cedet/tests/testvarnames.java60
-rw-r--r--test/manual/cedet/tests/testwisent.wy85
23 files changed, 1 insertions, 2459 deletions
diff --git a/test/manual/cedet/tests/test-fmt.cpp b/test/manual/cedet/tests/test-fmt.cpp
deleted file mode 100644
index ab869c1ce00..00000000000
--- a/test/manual/cedet/tests/test-fmt.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/** test-fmt.cpp --- Signatures, and format answers for testing
- *
- * Copyright (C) 2012, 2016, 2019-2021 Free Software Foundation, Inc.
- *
- * Author: Eric M. Ludlam <zappo@gnu.org>
- *
- * This file is part of GNU Emacs.
- *
- * GNU Emacs is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GNU Emacs is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
- */
-
-/*
- * About semantic-fmt-utest :
- *
- * These tests validate two features:
- * 1) The C++ parser can parse the different signatures
- * 2) The semantic-tag-format-* functions can recreate them.
- *
- */
-
-void basic_fcn() { }
-/*
- * ## name "basic_fcn"
- * ## abbreviate "basic_fcn()"
- * ## prototype "void basic_fcn ()"
- * ## uml-prototype "basic_fcn () : void"
- */
-
-int twoargs_fcn(int a, char b) { }
-/*
- * ## name "twoargs_fcn"
- * ## abbreviate "twoargs_fcn()"
- * ## prototype "int twoargs_fcn (int a,char b)"
- * ## uml-prototype "twoargs_fcn (a : int,b : char) : int"
- */
-
-struct moose {
- int field1;
- char field2;
-};
-/*
- * ## name "moose"
- * ## abbreviate "moose{}"
- * ## prototype "struct moose {}"
- * ## uml-prototype "moose{} : struct"
- */
-
-struct moose struct_fcn ( struct moose in, char *out);
-/*
- * ## name "struct_fcn"
- * ## abbreviate "struct_fcn()"
- * ## prototype "struct moose struct_fcn (struct moose in,char* out)"
- * ## uml-prototype "struct_fcn (in : struct moose,out : char*) : struct moose"
- */
-
-struct moose *var_one = NULL;
-/*
- * ## name "var_one"
- * ## summarize "Variables: struct moose* var_one[=NULL]"
- * ## prototype "struct moose* var_one[=NULL]"
- * ## uml-prototype "var_one : struct moose*"
- */
-
-const int var_two = 1;
-/*
- * ## name "var_two"
- * ## summarize "Variables: const int var_two[=1]"
- * ## prototype "const int var_two[=1]"
- * ## uml-prototype "var_two : int"
- */
-
-namespace NS {
- enum TestEnum {a,b};
-}
-/*
- * ## name "NS"
- * ## summarize "Types: namespace NS {}"
- * ## prototype "namespace NS {}"
- * ## uml-prototype "NS{} : namespace"
- */
-
-
-// void func_ns_arg(NS::TestEnum v = NS::a); <<--- TODO - bring FIX from CEDET on SF
-/*
- * # # name "func_ns_arg"
- * # # summarize "Functions: void func_ns_arg (NS::TestEnum v[=NS::a])"
- * # # prototype "void func_ns_arg (NS::TestEnum v[=NS::a])"
- * # # uml-prototype "func_ns_arg (v : NS::TestEnum) : void"
- */
-
-//int const var_three = 1;
-/*
- * # # name "var_three"
- * # # summarize "Variables: int const var_three" <-- this fails
- * # # prototype "int const var_three" <-- this fails
- * # # uml-prototype "var_three : int"
- */
diff --git a/test/manual/cedet/tests/test-fmt.el b/test/manual/cedet/tests/test-fmt.el
deleted file mode 100644
index 122571323b2..00000000000
--- a/test/manual/cedet/tests/test-fmt.el
+++ /dev/null
@@ -1,65 +0,0 @@
-;;; test-fmt.el --- test semantic tag formatting
-
-;;; Copyright (C) 2012, 2019-2021 Free Software Foundation, Inc.
-
-;; Author: Eric M. Ludlam <zappo@gnu.org>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;
-;;
-
-;;; Code:
-(require 'semantic)
-;;
-;; ## name "semantic"
-;; ## abbreviate "semantic<>"
-;; ## summarize "Requires: semantic"
-
-(defun test-fmt-1 (a)
- "Function with 1 arg.")
-;;
-;; ## name "test-fmt-1"
-;; ## abbreviate "(test-fmt-1)"
-;; ## summarize "Defuns: (test-fmt-1 a)"
-;; ## short-doc "Function with 1 arg."
-;; ## uml-prototype "(test-fmt-1 a)" <-- That is probably wrong.
-
-(defvar test-fmt-var nil
- "Variable test.")
-;;
-;; ## name "test-fmt-var"
-;; ## abbreviate "test-fmt-var"
-;; ## summarize "Variables: test-fmt-var"
-;; ## short-doc "Variable test."
-;; ## uml-prototype "test-fmt-var"
-
-(defclass test-fmt-class ()
- ((slot1 :initarg :slot1))
- "Class for testing.")
-;;
-;; ## name "test-fmt-class"
-;; ## abbreviate "test-fmt-class{}"
-;; ## summarize "Types: class test-fmt-class {}"
-;; ## short-doc "Class for testing."
-;; ## uml-prototype "class test-fmt-class {}"
-
-
-
-(provide 'test-fmt)
-
-;;; test-fmt.el ends here
diff --git a/test/manual/cedet/tests/test.el b/test/manual/cedet/tests/test.el
index 3bc945d89f8..d1d0d1602f4 100644
--- a/test/manual/cedet/tests/test.el
+++ b/test/manual/cedet/tests/test.el
@@ -1,4 +1,4 @@
-;;; test.el --- Unit test file for Semantic Emacs Lisp support.
+;;; test.el --- Unit test file for Semantic Emacs Lisp support. -*- lexical-binding: t -*-
;; Copyright (C) 2005-2021 Free Software Foundation, Inc.
@@ -153,7 +153,4 @@
(defvar-mode-local emacs-lisp-mode a-mode-local-def
"some value")
-
-;;; Provide
-;;
(provide 'test)
diff --git a/test/manual/cedet/tests/test.mk b/test/manual/cedet/tests/test.mk
deleted file mode 100644
index edea97e7b98..00000000000
--- a/test/manual/cedet/tests/test.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# A Test Makefile. -*-makefile-*-
-
-# This test is for a file in this test directory. Just a random one.
-FILES=testdoub # -1-
-# #1# ("testdoublens.cpp" "testdoublens.hpp" )
-
-all: optional
-
-# This one completes on a variable name.
-optional: $FIL # -2-
- # #2# ("FILES")
- compile $@
-
-notoptional: opt # -3-
- # #3# ("optional")
- echo "Done."
-
-#end
diff --git a/test/manual/cedet/tests/test.srt b/test/manual/cedet/tests/test.srt
deleted file mode 100644
index 38e6f9ed7b7..00000000000
--- a/test/manual/cedet/tests/test.srt
+++ /dev/null
@@ -1,64 +0,0 @@
-;; test.srt --- unit test support file for semantic-utest-ia
-
-;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-;; Author: Eric M. Ludlam <zappo@gnu.org>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-;;
-
-set mode "c++-mode"
-set escape_start "{{"
-set escape_end "}}"
-
-context file
-
-template class :blank
-"A test template for emacs lisp"
-----
-----
-
-template classic :blank
-"A test template for emacs lisp"
-----
-----
-
-template variable :blank
-"A test template for emacs lisp"
-----
-----
-
-template function :blank
-"A test template for emacs lisp"
-----
-----
-
-template testarea :blank
-"A test template for emacs lisp"
-----
-{{<A:cla}} -1-
- }} #1# ( "class" "classic" )
- {{^}}
-
-{{/A}}
-----
-
-;; This is a bad hack - In order for the text to parse, but also get a completion
-;; moniker into the right spot, we need to pretend a comment is the same as the
-;; escape_end.
-;; Local variables:
-;; comment-start-skip: "}}"
-;; End:
diff --git a/test/manual/cedet/tests/test.texi b/test/manual/cedet/tests/test.texi
deleted file mode 100644
index 37d303c8b48..00000000000
--- a/test/manual/cedet/tests/test.texi
+++ /dev/null
@@ -1,40 +0,0 @@
-\input texinfo
-@setfilename test.info
-@set TITLE TEST
-@set AUTHOR Eric Ludlam
-@settitle @value{TITLE}
-
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* test: (test). TEST
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
-@titlepage
-@sp 10
-@center @titlefont{test}
-@vskip 0pt plus 1 fill
-Copyright @copyright{} 2015 Eric Ludlam
-@end titlepage
-
-@node Top
-@top @value{TITLE}
-
-This is a simple manual filled with stuff that should test completion in texinfo mode.
-
-@m@c -1-
-@c #1# ( "@majorheading" "@macro" "@menu" "@multitable" )
-
-@menu
-* Index::
-@end menu
-
-
-@node Index
-@chapter Index
-
-@contents
-
-@bye
diff --git a/test/manual/cedet/tests/testdoublens.cpp b/test/manual/cedet/tests/testdoublens.cpp
deleted file mode 100644
index ea3afc72a69..00000000000
--- a/test/manual/cedet/tests/testdoublens.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-// testdoublens.cpp --- semantic-ia-utest completion engine unit tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-#include "testdoublens.hpp"
-
-namespace Name1 {
- namespace Name2 {
-
- Foo::Foo()
- {
- p// -1-
- // #1# ( "pMumble" "publishStuff" )
- ;
- }
-
- int Foo::get() // ^1^
- {
- p// -2-
- // #2# ( "pMumble" "publishStuff" )
- ;
- return 0;
- }
-
- void Foo::publishStuff(int a, int b) // ^2^
- {
- int foo = a;
- int bar = b;
- }
-
- // 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
-} // namespace Name1
-
-// Test multiple levels of metatype expansion
-int test_fcn () {
- stage3_Foo MyFoo;
-
- MyFoo.// -3-
- // #3# ( "Mumble" "get" )
- ;
-
- Name1::Name2::F//-4-
- // #4# ( "Foo" )
- ;
-
- // @TODO - get this working...
- Name1::stage2_Foo::M//-5-
- /// #5# ( "Mumble" )
- ;
-}
-
-stage3_Foo foo_fcn() {
- // Can we go "up" to foo with senator-go-to-up-reference?
-}
-
-
-// Second test from Ravikiran Rajagopal
-
-namespace A {
- class foo {
- public:
- void aa();
- void bb();
- };
-}
-namespace A {
- class bar {
- public:
- void xx();
- public:
- foo myFoo;
- };
-
- void bar::xx()
- {
- myFoo.// -6- <--- cursor is here after the dot
- // #6# ( "aa" "bb" )
- ;
- }
-}
-
-// Double namespace example from Hannu Koivisto
-//
-// This is tricky because the parent class "Foo" is found within the
-// scope of B, so the scope calculation needs to put that together
-// before searching for parents in scope.
-namespace a {
- namespace b {
-
- class Bar : public Foo
- {
- int baz();
- };
-
- int Bar::baz()
- {
- return dum// -7-
- // #7# ( "dumdum" )
- ;
- }
-
- } // namespace b
-} // namespace a
-
-// Three namespace example from Hannu Koivisto
-//
-// This one is special in that the name e::Foo, where "e" is in
-// the scope, and not referenced from the global namespace. This
-// wasn't previously handled, so the fullscope needed to be added
-// to the list of things searched when in split-name decent search mode
-// for scopes.
-
-namespace d {
- namespace e {
-
- class Foo
- {
- public:
- int write();
- };
-
- } // namespace d
-} // namespace e
-
-
-namespace d {
- namespace f {
-
- class Bar
- {
- public:
- int baz();
-
- private:
- e::Foo &foo;
- };
-
- int Bar::baz()
- {
- return foo.w// -8-
- // #8# ( "write" )
- ;
- }
-
- } // 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
deleted file mode 100644
index e8c9b345b28..00000000000
--- a/test/manual/cedet/tests/testdoublens.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// testdoublens.hpp --- Header file used in one of the Semantic tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-namespace Name1 {
- namespace Name2 {
-
- class Foo
- {
- typedef unsigned int Mumble;
- public:
- Foo();
- ~Foo();
- int get();
-
- private:
- void publishStuff(char /* a */, char /* b */);
-
- void publishStuff(int q, int r); // Purposely different names.
-
- void sendStuff(int a, int b);
-
- Mumble* pMumble;
- };
-
- typedef Foo stage1_Foo;
-
- } // namespace Name2
-
- typedef Name2::stage1_Foo stage2_Foo;
-
- typedef Name2::Foo decl_stage1_Foo;
-
-} // namespace Name1
-
-typedef Name1::stage2_Foo stage3_Foo;
-
-
-// Double namespace from Hannu Koivisto
-namespace a {
- namespace b {
-
- class Foo
- {
- struct Dum {
- int diDum;
- };
-
- protected:
- mutable a::b::Foo::Dum dumdum;
- };
-
- } // namespace b
-} // namespace a
diff --git a/test/manual/cedet/tests/testfriends.cpp b/test/manual/cedet/tests/testfriends.cpp
deleted file mode 100644
index 20425f93afa..00000000000
--- a/test/manual/cedet/tests/testfriends.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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" ) )
-}
-
diff --git a/test/manual/cedet/tests/testjavacomp.java b/test/manual/cedet/tests/testjavacomp.java
deleted file mode 100644
index bfc016903c8..00000000000
--- a/test/manual/cedet/tests/testjavacomp.java
+++ /dev/null
@@ -1,77 +0,0 @@
-// testjavacomp.java --- Semantic unit test for Java
-
-// Copyright (C) 2009-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-package tests.testjavacomp;
-
-class secondClass {
- private void scFuncOne() { }
- public void scFuncOne() { }
-
- int package_protected_field;
- public int public_protected_field;
- private int private_protected_field;
-}
-
-
-public class testjavacomp {
-
- private int funcOne() { }
- private int funcTwo() { }
- private char funcThree() { }
-
- class nestedClass {
- private void ncFuncOne() { }
- public void ncFuncOne() { }
- }
-
- public void publicFunc() {
-
- int i;
-
- i = fu// -1-
- // #1# ( "funcOne" "funcTwo" )
- ;
-
- fu// -2-
- // #2# ( "funcOne" "funcThree" "funcTwo" )
- ;
-
- secondClass SC;
-
- SC.s//-3-
- // #3# ( "scFuncOne" )
- ;
-
- // @TODO - to make this test complete, we need an import
- // with a package protected field that is excluded
- // from the completion list.
- SC.p//-4-
- // #4# ( "package_protected_field" "public_protected_field" )
-
- nestedClass NC;
-
- // @todo - need to fix this? I don't know if this is legal java.
- NC.// - 5-
- // #5# ( "ncFuncOne" )
- ;
- }
-
-} // testjavacomp
diff --git a/test/manual/cedet/tests/testlocalvars.cpp b/test/manual/cedet/tests/testlocalvars.cpp
deleted file mode 100644
index 9d2329a0fa8..00000000000
--- a/test/manual/cedet/tests/testlocalvars.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// testlocalvars.java --- Semantic unit test for Java
-
-// Copyright (C) 2009-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-
-class foo {
- foo *member;
- char anArray[10];
-};
-
-void func()
-{
- foo local1;
- foo* local2 = localvar.member;
- foo* local3 = new foo();
- foo local4[10];
- char local5[5] = {'1','2','3','4','5'};
- char *local6 = "12345";
- char local7 = local.anArray[0];
- char local8 = true ? 10 : 11 ;
-
- // Check that all of the above was parsed
- local//-1-
- ; //#1# ("local1" "local2" "local3" "local4" "local5" "local6" "local7" "local8" )
-
- local1.//-2-
- ; //#2# ("anArray" "member")
-
- local2->//-3-
- ; //#3# ("anArray" "member")
-
- local3->//-4-
- ; //#4# ("anArray" "member")
-
- local4[0].//-5-
- ; //#5# ("anArray" "member")
-}
diff --git a/test/manual/cedet/tests/testnsp.cpp b/test/manual/cedet/tests/testnsp.cpp
deleted file mode 100644
index db1603cead2..00000000000
--- a/test/manual/cedet/tests/testnsp.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/* testnsp.cpp --- semantic-ia-utest completion engine unit tests
-
- Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
- Author: Eric M. Ludlam <zappo@gnu.org>
-
- This file is part of GNU Emacs.
-
- GNU Emacs is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- GNU Emacs is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-namespace nsp {
-
- class rootclass {
- public:
- int fromroot() {};
- };
-
-}
-
-namespace nsp {
- class childclass : public rootclass {
- public:
- int fromchild() {};
- };
-}
-
-void myfcn_not_in_ns (void) {
- nsp::childclass test;
-
- test.// -1-
- ; // #1# ( "fromchild" "fromroot" )
-}
-
-// Test a class declared in a class, where the contents
-// are in a qualified name.
-//
-// Thanks Michael Reiher for the concise example.
-
-class AAA
-{
-public:
- AAA();
-
- void aaa();
-
-private:
- class Private;
- Private * const d;
-};
-
-class AAA::Private
-{
- Private() : bbb(0) {
- }
-
- BBB* bbb;
-};
-
-void AAA::aaa()
-{
- d->// -2-
- ; // #2# ( "bbb" )
-}
-
-// #include files inside a namespace
-// David Engster <deng@randomsample.de>
-// See revisions 8034-8037 which implement this.
-
-namespace another {
- #include "testdoublens.hpp"
-}
-
-void foo(void) {
-
- another::// -3-
- ; // #3# ( "Name1" "a" "stage3_Foo" )
-
- another::Name1::Name2::Foo a;
-
- a.// -4-
- ; // #4# ( "Mumble" "get" )
-}
-
-// What happens if a type your looking for is scoped within a type,
-// but you are one level into the completion so the originating scope
-// excludes the type of the variable you are completing through?
-// Thanks Martin Stein for this nice example.
-
-namespace ms_structs
-{
- struct ms_aaa
- {
- int xx;
- };
-
- struct ms_bbb
- {
- struct ms_aaa yy;
- };
-};
-
-int fun()
-{
- using namespace ms_structs;
- struct ms_bbb mszz;
- int uu = mszz.// -5-
- ; // #5# ( "yy" )
- int kk = mszz.yy.// - 6- @TODO - bring in patch from SF
- ; // #6# ( "xx" )
-}
diff --git a/test/manual/cedet/tests/testsppcomplete.c b/test/manual/cedet/tests/testsppcomplete.c
deleted file mode 100644
index 084d6a8687d..00000000000
--- a/test/manual/cedet/tests/testsppcomplete.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* testesppcomplete.cpp --- semantic-ia-utest completion engine unit tests
-
- Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
- Author: Eric M. Ludlam <zappo@gnu.org>
-
- This file is part of GNU Emacs.
-
- GNU Emacs is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- GNU Emacs is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-*/
-
-/* Example provided by Hannes Janetzek */
-
-struct Test { int test; };
-
-#define BLA(_type) \
- _type *bla = (_type*) malloc(sizeof(_type));
-
-#define BLUB(_type) \
- (_type*)malloc(sizeof(_type));
-
-#define FOO(_type) \
- _type *foo = BLUB(_type);
-
-#define BAR(_type) \
- _type *bar = (*_type)BLUB(_type);
-
-int main(int argc, char *argv[]) {
- BLA(Test);
- bla->// -1-
- ; // #1# ( "test" )
-
- FOO(Test);
- foo->// -2-
- ; // #2# ( "test" )
-
- BAR(Test);
- bar->// -3-
- ; // #3# ( "test" )
-}
-
-/* Test symref and macros together. */
-
-// This function exists only so we can have a comment in a tag with this name.
-void function_with_macro_name ()
-// %1% ( ( "testsppcomplete.c" ) ( "function_with_macro_name" "function_with_macro_name" "use_macro") )
-// Note: fwmn is in twice, once for function, and once for the constant macro below.
-{
-}
-
-#define function_with_macro_name 1
-
-int use_macro () {
- int a = function_with_macro_name;
-}
diff --git a/test/manual/cedet/tests/teststruct.cpp b/test/manual/cedet/tests/teststruct.cpp
deleted file mode 100644
index 6659b5557b8..00000000000
--- a/test/manual/cedet/tests/teststruct.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-// teststruct.cpp --- semantic-ia-utest completion engine unit tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-
-// Note: initially provided by by Alex Ott.
-
-template <typename DerivedT>
-struct grammar {
-public:
- typedef grammar<DerivedT> self_t;
- typedef DerivedT const& embed_t;
- grammar() {}
- ~grammar() { }
- void use_parser() const { }
- void test1() { }
-};
-
-struct PDFbool_parser : public grammar<PDFbool_parser> {
- PDFbool_parser() {}
- template <typename scannerT> struct definition {
- typedef typename scannerT::iterator_t iterator_t;
- int top;
- definition(const PDFbool_parser& /*self*/) {
- return ;
- }
- const int start() const {
- return top;
- }
- };
-};
-
-int main(void) {
- PDFbool_parser PDFbool_p = PDFbool_parser();
- PDFbool_p.//-1-
- ;
- // #1# ("definition" "embed_t" "self_t" "test1" "use_parser")
-}
-
-// ----------------------------------------------------------------------
-
-template <class Derived> struct Base {
-public:
- void interface()
- {
- // ...
- static_cast<Derived*>(this)->implementation();
- // ...
- }
-
- static void static_func()
- {
- // ...
- Derived::static_sub_func();
- // ...
- }
-};
-
-struct Derived : Base<Derived> {
- void implementation() { }
- static void static_sub_func() { }
-};
-
-int foo () {
- Derived d;
- d.//-2-
- ;
- // #2# ("implementation" "interface" "static_func" "static_sub_func")
-}
diff --git a/test/manual/cedet/tests/testsubclass.cpp b/test/manual/cedet/tests/testsubclass.cpp
deleted file mode 100644
index 409950cce2f..00000000000
--- a/test/manual/cedet/tests/testsubclass.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-// testsubclass.cpp --- unit test for analyzer and complex C++ inheritance
-
-// Copyright (C) 2007-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-//#include <iostream>
-#include "testsubclass.hh"
-
-void animal::moose::setFeet(int numfeet) //^1^
-{
- if (numfeet > 4) {
- std::cerr << "Why would a moose have more than 4 feet?" << std::endl;
- return;
- }
-
- fFeet = numfeet;
-}
-
-int animal::moose::getFeet() //^2^
-{
- return fFeet;
-}
-
-void animal::moose::doNothing() //^3^
-{
- animal::moose foo();
-
- fFeet = N// -15-
- ; // #15# ( "NAME1" "NAME2" "NAME3" )
-}
-
-
-void deer::moose::setAntlers(bool have_antlers) //^4^
-{
- fAntlers = have_antlers;
-}
-
-bool deer::moose::getAntlers() //^5^
-// %1% ( ( "testsubclass.cpp" "testsubclass.hh" ) ( "deer::moose::doSomething" "deer::moose::getAntlers" "moose" ) )
-{
- return fAntlers;
-}
-
-bool i_dont_have_symrefs()
-// %2% ( ("testsubclass.cpp" ) ("i_dont_have_symrefs"))
-{
-}
-
-void deer::moose::doSomething() //^6^
-{
- // All these functions should be identified by semantic analyzer.
- getAntlers();
- setAntlers(true);
-
- getFeet();
- setFeet(true);
-
- doNothing();
-
- fSomeField = true;
-
- fIsValid = true;
-}
-
-void deer::alces::setLatin(bool l) {
- fLatin = l;
-}
-
-bool deer::alces::getLatin() {
- return fLatin;
-}
-
-void deer::alces::doLatinStuff(moose moosein) {
- // All these functions should be identified by semantic analyzer.
- getFeet();
- setFeet(true);
-
- getLatin();
- setLatin(true);
-
- doNothing();
-
- deer::moose foo();
-
-
-}
-
-moose deer::alces::createMoose()
-{
- moose MooseVariableName;
- bool tmp;
- int itmp;
- bool fool;
- int fast;
-
- MooseVariableName = createMoose();
-
- doLatinStuff(MooseVariableName);
-
- tmp = this.f// -1-
- // #1# ( "fAlcesBool" "fIsValid" "fLatin" )
- ;
-
- itmp = this.f// -2-
- // #2# ( "fAlcesInt" "fGreek" "fIsProtectedInt" )
- ;
-
- tmp = f// -3-
- // #3# ( "fAlcesBool" "fIsValid" "fLatin" "fool" )
- ;
-
- itmp = f// -4-
- // #4# ( "fAlcesInt" "fGreek" "fIsProtectedInt" "fast" )
- ;
-
- MooseVariableName = m// -5-
- // #5# ( "moose" )
-
- return MooseVariableName;
-}
-
-/** Test Scope Changes
- *
- * This function is rigged to make sure the scope changes to account
- * for different locations in local variable parsing.
- */
-int someFunction(int mPickle)
-{
- moose mMoose = deer::alces::createMoose();
-
- if (mPickle == 1) {
-
- int mOption1 = 2;
-
- m// -5-
- // #5# ( "mMoose" "mOption1" "mPickle" )
- ;
-
- } else {
-
- int mOption2 = 2;
-
- m// -6-
- // #6# ( "mMoose" "mOption2" "mPickle" )
- ;
- }
-
-}
-
-// Thanks Ming-Wei Chang for this next example.
-
-namespace pub_priv {
-
- class A{
- private:
- void private_a(){}
- public:
- void public_a();
- };
-
- void A::public_a() {
- A other_a;
-
- other_a.p// -7-
- // #7# ( "private_a" "public_a" )
- ;
- }
-
- int some_regular_function(){
- A a;
- a.p// -8-
- // #8# ( "public_a" )
- ;
- return 0;
- }
-
-}
-
-
-/** Test Scope w/in a function (non-method) with classes using
- * different levels of inheritance.
- */
-int otherFunction()
-{
- sneaky::antelope Antelope(1);
- sneaky::jackalope Jackalope(1);
- sneaky::bugalope Bugalope(1);
-
- Antelope.// -9-
- // #9# ( "fAntyPublic" "fQuadPublic" "testAccess")
- ;
-
- Jackalope.// -10-
- // #10# ( "fBunnyPublic" "testAccess")
- ;
-
- Jackalope// @1@ 6
- ;
- Jackalope;
- Jackalope;
- Jackalope;
-
- Bugalope.// -11-
- // #11# ( "fBugPublic" "testAccess")
- ;
- Bugalope// @2@ 3
- ;
-}
-
-/** Test methods within each class for types of access to the baseclass.
- */
-
-bool sneaky::antelope::testAccess() //^7^
-{
- this.// -12-
- // #12# ( "fAntyPrivate" "fAntyProtected" "fAntyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
- ;
-}
-
-bool sneaky::jackalope::testAccess() //^8^
-{
- this.// -13-
- // #13# ( "fBunnyPrivate" "fBunnyProtected" "fBunnyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
- ;
-}
-
-bool sneaky::bugalope::testAccess() //^9^
-{
- this.// -14-
- // #14# ( "fBugPrivate" "fBugProtected" "fBugPublic" "fQuadPublic" "testAccess" )
- ;
-}
diff --git a/test/manual/cedet/tests/testsubclass.hh b/test/manual/cedet/tests/testsubclass.hh
deleted file mode 100644
index 5d795b32b10..00000000000
--- a/test/manual/cedet/tests/testsubclass.hh
+++ /dev/null
@@ -1,190 +0,0 @@
-// testsubclass.hh --- unit test for analyzer and complex C++ inheritance
-
-// Copyright (C) 2007-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-//#include <cmath>
-// #include <stdio.h>
-
-#ifndef TESTSUBCLASS_HH
-#define TESTSUBCLASS_HH
-
-namespace animal {
-
- class moose {
- public:
- moose() : fFeet(0),
- fIsValid(false)
- { }
-
- virtual void setFeet(int);
- int getFeet();
-
- void doNothing();
-
- enum moose_enum {
- NAME1, NAME2, NAME3 };
-
-
- protected:
-
- bool fIsValid;
- int fIsProtectedInt;
-
- private:
- int fFeet; // Usually 2 or 4.
- bool fIsPrivateBool;
-
- }; // moose
-
- int two_prototypes();
- int two_prototypes();
-
- class quadruped {
- public:
- quadruped(int a) : fQuadPrivate(a)
- { }
-
- int fQuadPublic;
-
- protected:
- int fQuadProtected;
-
- private:
- int fQuadPrivate;
-
- };
-
-}
-
-
-namespace deer {
-
- class moose : public animal::moose {
- public:
- moose() : fAntlers(false)
- { }
-
- void setAntlers(bool);
- bool getAntlers();
-
- void doSomething();
-
- protected:
-
- bool fSomeField;
-
- private:
- bool fAntlers;
-
- };
-
-} // deer
-
-// A second namespace of the same name will test the
-// namespace merging needed to resolve deer::alces
-namespace deer {
-
- class alces : public animal::moose {
- public:
- alces(int lat) : fLatin(lat)
- { }
-
- void setLatin(bool);
- bool getLatin();
-
- void doLatinStuff(moose moosein); // for completion testing
-
- moose createMoose(); // for completion testing.
-
- protected:
- bool fAlcesBool;
- int fAlcesInt;
-
- private:
- bool fLatin;
- int fGreek;
- };
-
-};
-
-// A third namespace with classes that does protected and private inheritance.
-namespace sneaky {
-
- class antelope : public animal::quadruped {
-
- public:
- antelope(int a) : animal::quadruped(),
- fAntyProtected(a)
- {}
-
- int fAntyPublic;
-
- bool testAccess();
-
- protected:
- int fAntyProtected;
-
- private :
- int fAntyPrivate;
-
- };
-
- class jackalope : protected animal::quadruped {
-
- public:
- jackalope(int a) : animal::quadruped(),
- fBunny(a)
- {}
-
- int fBunnyPublic;
-
- bool testAccess();
-
- protected:
- bool fBunnyProtected;
-
- private :
- bool fBunnyPrivate;
-
- };
-
- // Nothing specified means private.
- class bugalope : /* private*/ animal::quadruped {
-
- public:
- bugalope(int a) : animal::quadruped(),
- fBug(a)
- {}
-
- int fBugPublic;
-
- bool testAccess();
- protected:
- bool fBugProtected;
-
- private :
- bool fBugPrivate;
-
- };
-
-
-};
-
-#endif
diff --git a/test/manual/cedet/tests/testtemplates.cpp b/test/manual/cedet/tests/testtemplates.cpp
deleted file mode 100644
index ed7a057df0b..00000000000
--- a/test/manual/cedet/tests/testtemplates.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// testtemplates.cpp --- semantic-ia-utest completion engine unit tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-
-// TODO - this probably means can't be part of emacs, as I don't know who this guy is.
-// Written by 'Raf'
-
-template <class T, int U, class V>
-class read_ref {
-public:
- const T* read_ref_member_one( T);
- const V* read_ref_member_two();
-};
-
-namespace NS {
- template <class T, int U, class V>
- class ref {
- public:
- read_ref<T,10,V> operator->() {
- m_// -1-
- ;
- // #1# ( "m_datas" )
- }
-
- private:
- T m_datas[U];
- };
-
-}
-
-class FooOne {
-public:
- int fooOneMember();
-};
-
-class FooTwo {
-public:
- int fooTwoMember();
-};
-
-class FooThree {
-public:
- int fooThreeMember();
-
- FooOne * operator->();
-};
-
-typedef ref<FooOne, 10,FooTwo> Test;
-
-using NS;
-
-void
-main(void) {
- ref<FooOne, 10, FooTwo> v;
-
- v->read_ref_member_one()-> // -2-
- ;
- // #2# ( "fooOneMember" )
-
- v->read_ref_member_two()-> // -3-
- ;
- // #3# ( "fooTwoMember" )
-
- v-> // -4-
- ;
- // #4# ( "read_ref_member_one" "read_ref_member_two" )
-
- Test t;
-
- t->read_ref_member_two()-> // -5-
- ;
- // #5# ( "fooTwoMember" )
-
- ref<FooOne, 10, FooThree> v2;
-
- v2->read_ref_member_two()-> // -6-
- ;
- // #6# ( "fooOneMember" )
-
- /* Try all these things by also specifying the namespace in the name. */
- NS::ref<FooOne, 10, FooTwo> v3;
-
- v3->read_ref_member_one()-> // -7-
- ;
- // #7# ( "fooOneMember" )
-
- v3->read_ref_member_two()-> // -8-
- ;
- // #8# ( "fooTwoMember" )
-
- v3->read_ref_member_two// @1@ 5
- ;
-
-}
-
-// More Namespace Magic using member constants.
-
-template<typename T>
-struct isFooLike {
- static const bool value = false;
-};
-
-template <>
-struct isFooLike<int> {
- static const bool value = true;
-};
-
-
-template <typename T, bool isFoo>
-class A {
-public:
- A();
- void foo() {};
-};
-
-
-template <typename T>
-class FooFour : public A<T, isPodLike<T>::value> {
-public:
- bool bar() {}
-};
-
-
-int main2() {
-
- FooFour<int> ff;
-
- ff.// - 9- @ TODO - bring over patch from SF
- ; // #9# ( "bar" "foo" );
-
-}
diff --git a/test/manual/cedet/tests/testtypedefs.cpp b/test/manual/cedet/tests/testtypedefs.cpp
deleted file mode 100644
index c82535f9581..00000000000
--- a/test/manual/cedet/tests/testtypedefs.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-// testtypedefs.cpp --- Sample with some fake bits out of std::string
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-// Thanks Ming-Wei Chang for these examples.
-
-namespace std {
- template <T>class basic_string {
- public:
- void resize(int);
- };
-}
-
-typedef std::basic_string<char> mstring;
-
-using namespace std;
-typedef basic_string<char> bstring;
-
-int main(){
- mstring a;
- a.// -1-
- ;
- // #1# ( "resize" )
- bstring b;
- // It doesn't work here.
- b.// -2-
- ;
- // #2# ( "resize" )
- return 0;
-}
-
-// ------------------
-
-class Bar
-{
-public:
- void someFunc() {}
-};
-
-typedef Bar new_Bar;
-
-template <class mytype>
-class TBar
-{
-public:
- void otherFunc() {}
-};
-
-typedef TBar<char> new_TBar;
-
-int main()
-{
- new_Bar nb;
- new_TBar ntb;
-
- nb.// -3-
- ;
- // #3# ("someFunc")
- ntb.// -4-
- ;
- // #4# ("otherFunc")
-
- return 0;
-}
-
-// ------------------
-// Example from Yupeng.
-
-typedef struct epd_info {
- int a;
-} epd_info_t;
-
-static int epd_probe(struct platform_device *pdev)
-{
- struct epd_info *db;
- epd_info_t db1;
-
- db.// -5-
- ; // #5# ("a")
- db1.// -6-
- ;// #6# ("a")
-
- return 1;
-}
-
-// ------------------
-// Example from Michel LAFON-PUYO
-
-typedef enum
-{
- ENUM1,
- ENUM2
-} e_toto;
-
-typedef struct
-{
- int field_a;
- int field_b;
-} t_toto;
-
-// Note: Error condition from anonymous types in a typedef
-// was that the first (ie - the enum) would be used in
-// place of the struct.
-int func(void)
-{
- t_toto t;
- t. // -7-
- ; // #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();
-
- mcptr-> // -8-
- ; // #8# ( "myFunction" )
- mch-> // - 9- TODO bring over patch from SF
- ; // #9# ( "myFunction" )
- deleteMyClassHandle(mch);
-
- return 0;
-}
diff --git a/test/manual/cedet/tests/testusing.cpp b/test/manual/cedet/tests/testusing.cpp
deleted file mode 100644
index 6f6c8542633..00000000000
--- a/test/manual/cedet/tests/testusing.cpp
+++ /dev/null
@@ -1,265 +0,0 @@
-// testusing.cpp --- semantic-ia-utest completion engine unit tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-
-#include <adstdio.h>
-
-#include <testusing.hh>
-
-namespace moose {
-
- class MyClass;
- class Point;
-
- typedef MyClass snerk;
-}
-
-namespace moose {
-
- class Point;
- class MyClass;
-
-}
-
-namespace {
-
- int global_variable = 0;
-
-};
-
-using moose::MyClass;
-
-void someFcn() {
-
- MyClass f;
-
- f.//-1-
- ; //#1# ( "getVal" "setVal" )
-
-}
-
-// Code from Zhiqiu Kong
-
-namespace panda {
-
- using namespace bread_name;
-
- int func()
- {
- bread test;
- test.//-2-
- ;// #2# ( "geta" )
- return 0;
- }
-}
-
-namespace togglemoose {
-
- MyOtherClass::testToggle1() { //^1^
- // Impl for testToggle1
- }
-}
-
-togglemoose::MyOtherClass::testToggle2() { //^3^
- // Impl for testToggle2
-}
-
-using togglemoose;
-
-MyOtherClass::testToggle3() { //^3^
- // Impl for testToggle3
-}
-
-// Local using statements and aliased types
-// Code from David Engster
-
-void func2()
-{
- using namespace somestuff;
- OneClass f;
- f.//-3-
- ; //#3# ( "aFunc" "anInt" )
-}
-
-void func3()
-{
- using somestuff::OneClass;
- OneClass f;
- f.//-4-
- ; //#4# ( "aFunc" "anInt" )
-}
-
-// Dereferencing alias types created through 'using' statements
-
-// Alias with fully qualified name
-void func4()
-{
- otherstuff::OneClass f;
- f. //-5-
- ; //#5# ( "aFunc" "anInt" )
-}
-
-// Alias through namespace directive
-void func5()
-{
- using namespace otherstuff;
- OneClass f;
- f. //-6-
- ; //#6# ( "aFunc" "anInt" )
-}
-
-// Check name hiding
-void func6()
-{
- using namespace morestuff;
- OneClass f; // Alias for somestuff::OneClass
- f. //-7-
- ; //#7# ( "aFunc" "anInt" )
- aStruct g; // This however is morestuff::aStruct !
- g. //-8-
- ; //#8# ( "anotherBar" "anotherFoo" )
-}
-
-// Alias of an alias
-// Currently doesn't work interactively for some reason.
-void func6()
-{
- using namespace evenmorestuff;
- OneClass f;
- f. //-7-
- ; //#7# ( "aFunc" "anInt" )
-}
-
-// Alias for struct in nested namespace, fully qualified
-void func7()
-{
- outer::StructNested f;
- f.//-8-
- ; //#8# ( "one" "two" )
-}
-
-// Alias for nested namespace
-void func8()
-{
- using namespace outerinner;
- StructNested f;
- AnotherStruct g;
- f.//-9-
- ; //#9# ( "one" "two" )
- g.//-10-
- ; //#10# ( "four" "three" )
-}
-
-// Check conventional namespace aliases
-// - fully qualified -
-void func9()
-{
- alias_for_somestuff::OneClass c;
- c.//-11-
- ; //#11# ( "aFunc" "anInt" )
- alias_for_outerinner::AnotherStruct s;
- s. //-12-
- ; //#12# ( "four" "three" )
-}
-
-// - unqualified -
-void func10()
-{
- using namespace alias_for_somestuff;
- OneClass c2;
- c2.//-13-
- ; //#13# ( "aFunc" "anInt" )
- using namespace alias_for_outerinner;
- AnotherStruct s2;
- s2.//-14-
- ; //#14# ( "four" "three" )
-}
-
-// Completion on namespace aliases
-void func11()
-{
- alias_for_somestuff:://-15-
- ; //#15# ( "OneClass" "aStruct")
- alias_for_outerinner:://-16-
- ; //#16# ( "AnotherStruct" "StructNested" )
-}
-
-// make sure unfound using statements don't crash stuff.
-using something::cantbe::Found;
-
-void unfoundfunc()
-{
- NotFound notfound; // Variable can't be found.
-
- notfound.//-17-
- ; //#17# ( ) Nothing here since this is an undefined class
-
-}
-
-// Using statements can depend on previous ones...
-
-void acc_using()
-{
- using namespace outer;
- // This is effectively like 'using namespace outer::inner'
- using namespace inner;
-
- StructNested sn;
- sn.//-18-
- ; //#18# ( "one" "two" )
-}
-
-// Check the same outside of function scope
-
-using namespace outer;
-using namespace inner;
-
-void acc_using2()
-{
- StructNested sn;
- sn.//-19-
- ; //#19# ( "one" "two" )
-}
-
-// Check if scope gets correctly generated, i.e., without us providing any
-// hints in the form of an existing type
-
-void check_scope()
-{
- using namespace first;
- AAA//-20-
- ; //#20# ( "AAA1" "AAA2" )
-}
-
-void check_scope2()
-{
- using namespace third;
- AAA//-21-
- ; //#21# ( "AAA1" "AAA2" "AAA3" )
-}
-
-// Make sure this also works not only in functions
-
-namespace check_scope3 {
- using namespace first;
- AAA//-22-
- ; //#22# ( "AAA1" "AAA2" )
-}
diff --git a/test/manual/cedet/tests/testusing.hh b/test/manual/cedet/tests/testusing.hh
deleted file mode 100644
index d3b690f8542..00000000000
--- a/test/manual/cedet/tests/testusing.hh
+++ /dev/null
@@ -1,176 +0,0 @@
-// testusing.hh --- semantic-ia-utest completion engine unit tests
-
-// Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-namespace moose {
-
- class Point;
-
- class MyClass;
-
-}
-
-
-namespace moose {
-
- class Point;
-
- class MyClass {
- public:
- MyClass() : fVal(0) {
- }
-
- ~MyClass() {};
-
- /**
- * fVal Accessors
- * @{
- */
- int getVal() const {
- return fVal;
- }
- void setVal(int Val) const {
- fVal = Val;
- }
- /**
- * @}
- */
-
- private:
- int fVal;
- };
-
-}
-
-namespace togglemoose {
-
- class MyOtherClass {
- public:
- int testToggle1();
- int testToggle2();
- int testToggle3();
- };
-}
-
-namespace deer {
-
- class Pickle;
-
-};
-
-// Code from Zhiqiu Kong
-
-#ifndef BREAD_H
-#define BREAD_H
-
-namespace bread_name {
- class bread
- {
- public:
- void geta();
- private:
- int m_a;
- int m_b;
- };
-}
-
-#endif
-
-// Code from David Engster
-// Creating alias types through 'using' trickery
-
-namespace somestuff {
- class OneClass {
- public:
- void aFunc();
- int anInt;
- };
- struct aStruct {
- int foo;
- int bar;
- };
-}
-
-namespace otherstuff {
- // make otherstuff::OneClass an alias for somestuff::OneClass
- using somestuff::OneClass;
-}
-
-namespace morestuff {
- // make morestuff an alias namespace for somestuff
- using namespace somestuff;
- // but hide aStruct with own type
- struct aStruct {
- int anotherFoo;
- int anotherBar;
- };
-}
-
-// We can also create an alias for an alias
-namespace evenmorestuff {
- using otherstuff::OneClass;
-}
-
-// Now with nested namespaces
-namespace outer {
- namespace inner {
- struct StructNested {
- int one;
- int two;
- };
- struct AnotherStruct {
- int three;
- int four;
- };
- }
-}
-
-// Namespace which pulls in one of its own nested namespaces
-namespace first {
- class AAA1;
- namespace second {
- class AAA2;
- }
- // Elevate nested namespace into first one
- using namespace second;
-}
-
-namespace third {
- using namespace first;
- class AAA3;
-}
-
-
-// Elevate the first struct into 'outer'
-// so that we can access it via 'outer::StructNested'
-namespace outer {
- using outer::inner::StructNested;
-}
-
-// Create an alias for a nested namespace
-namespace outerinner {
- // equivalent to 'namespace outerinner = outer::inner;'
- using namespace outer::inner;
-}
-
-// Create namespace alias
-namespace alias_for_somestuff = somestuff;
-// Same for nested namespace
-namespace alias_for_outerinner = outer::inner;
diff --git a/test/manual/cedet/tests/testvarnames.c b/test/manual/cedet/tests/testvarnames.c
deleted file mode 100644
index e796eb285c6..00000000000
--- a/test/manual/cedet/tests/testvarnames.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* testvarnames.cpp --- semantic-ia-utest completion engine unit tests
-
- Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
- Author: Eric M. Ludlam <zappo@gnu.org>
-
- This file is part of GNU Emacs.
-
- GNU Emacs is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- GNU Emacs is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-*/
-
-struct independent {
- int indep_1;
- int indep_2;
-};
-
-struct independent var_indep_struct;
-
-struct {
- int unnamed_1;
- int unnamed_2;
-} var_unnamed_struct;
-
-struct {
- int unnamed_3;
- int unnamed_4;
-} var_un_2, var_un_3;
-
-struct inlinestruct {
- int named_1;
- int named_2;
-} var_named_struct;
-
-struct inline2struct {
- int named_3;
- int named_4;
-} var_n_2, var_n_3;
-
-/* Structures with names that then declare variables
- * should also be completable.
- *
- * Getting this to work is the bugfix in semantic-c.el CVS v 1.122
- */
-struct inlinestruct in_var1;
-struct inline2struct in_var2;
-
-/*
- * Structures (or any types) could have the same name as a variable.
- * Make sure we complete vars over types.
- *
- * See cedet-devel mailing list Dec 23, 2013 for details.
- */
-struct varorstruct {};
-int varorstruct;
-
-int assigntovarorstruct;
-
-int test_1(int var_arg1) {
-
- var_// -1-
- ; // #1# ("var_arg1" "var_indep_struct" "var_n_2" "var_n_3" "var_named_struct" "var_un_2" "var_un_3" "var_unnamed_struct")
-
- var_indep_struct.// -2-
- ; // #2# ( "indep_1" "indep_2" )
-
- var_unnamed_struct.// -3-
- ; // #3# ( "unnamed_1" "unnamed_2" )
-
- var_named_struct.// -4-
- ; // #4# ( "named_1" "named_2" )
-
- var_un_2.// -5-
- ; // #5# ( "unnamed_3" "unnamed_4" )
- var_un_3.// -6-
- ; // #6# ( "unnamed_3" "unnamed_4" )
-
- var_n_2.// -7-
- ; // #7# ( "named_3" "named_4" )
- var_n_3.// -8-
- ; // #8# ( "named_3" "named_4" )
-
- in_// -9-
- ; // #9# ( "in_var1" "in_var2" )
-
- in_var1.// -10-
- ; // #10# ( "named_1" "named_2")
- in_var2.// -11-
- ; // #11# ( "named_3" "named_4")
-
- varorstruct = assign// -12-
- ; // #12# ( "assigntovarorstruct" )
-}
diff --git a/test/manual/cedet/tests/testvarnames.java b/test/manual/cedet/tests/testvarnames.java
deleted file mode 100644
index 7ed9785fc07..00000000000
--- a/test/manual/cedet/tests/testvarnames.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// testvarnames.java --- Semantic unit test for Java
-
-// Copyright (C) 2009-2021 Free Software Foundation, Inc.
-
-// Author: Eric M. Ludlam <zappo@gnu.org>
-
-// This file is part of GNU Emacs.
-
-// GNU Emacs is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// GNU Emacs is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-package tests;
-
-/**
- *
- *
- * Created: 02/17/14
- *
- * @author Eric M. Ludlam
- * @version
- * @since
- */
-public class testvarnames {
-
- public class varorclass {
- public static long misclongvalue;
- };
-
- public static varorclass varoftypevarorclass = NULL;
-
- public static long varorclass = 1;
-
- public static long assignintovar = 1;
-
- public static varorclass classassign = NULL;
-
- static public void main(String [] args) {
-
- varorclass = assign// -1-
- // #1# ( "assignintovar" )
- ;
-
- varoftypevarorclass = clas// -2-
- // #2# ( "classassign" )
-
- varoftypevarorclass.misc//-3-
- // #3# ( "misclongvalue" )
- }
-
-} // testvarnames
diff --git a/test/manual/cedet/tests/testwisent.wy b/test/manual/cedet/tests/testwisent.wy
deleted file mode 100644
index 49eb5780f4b..00000000000
--- a/test/manual/cedet/tests/testwisent.wy
+++ /dev/null
@@ -1,85 +0,0 @@
-;; testwisent.wy --- unit test support file for semantic-utest-ia
-
-;; Copyright (C) 2008-2021 Free Software Foundation, Inc.
-
-;; Author: Eric M. Ludlam <zappo@gnu.org>
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-;;
-;; Parser for nothing in particular mode
-
-%languagemode nothing-mode
-%parsetable wisent-nothing-parser-tables
-%keywordtable wisent-nothing-keywords
-%tokentable wisent-nothing-tokens
-%languagemode nothing-mode
-%setupfunction wisent-nothing-default-setup
-
-%start goal
-
-;;; Punctuation
-%type <punctuation> ;;syntax "\\(\\s.\\|\\s$\\|\\s'\\)+" matchdatatype string
-
-%token <punctuation> DOT "."
-%token <punctuation> COMA ","
-%token <punctuation> COLONCOLON "::"
-%token <punctuation> COLON ":"
-%token <punctuation> SEMICOLON ";"
-
-;;; KEYWORDS
-%type <keyword>
-
-%keyword COLONOSCOPY "colonoscopy"
-%keyword SEMISOMETHING "semisomething"
-
-%%
-
-goal
- ;; Misc
- : COLON ;; -1-
- ;; #1# ( "COLONCOLON" "COLON" "COLONOSCOPY" )
- | SEMI ;; -2-
- ;; #2# ( "SEMI_useless_rule" "SEMICOLON" "SEMISOMETHING" )
- | thing ;; -3-
- ;; #3# ( "thing_term_1" "thing_term_2" )
- ;
-
-SEMI_useless_rule
- :
- ;
-
-thing_term_1
- :
- ;
-
-thing_term_2
- :
- ;
-
-%%
-(define-lex wisent-nothing-lexer
- "Lexical analyzer to handle nothing in particular buffers."
- ;; semantic-lex-newline
- semantic-lex-ignore-whitespace
- semantic-lex-ignore-newline
- semantic-lex-ignore-comments
-
- semantic-lex-default-action
- )
-
-;; testwisent.wy ends here \ No newline at end of file