aboutsummaryrefslogtreecommitdiffstats
path: root/test/cedet/tests/testsubclass.cpp
diff options
context:
space:
mode:
authorPhillip Lord2015-11-23 22:02:42 +0000
committerPhillip Lord2015-11-24 17:04:22 +0000
commit22bbf7ca22f11cc33d887d0162cf2ec6661c3a3e (patch)
tree779ff7e07667194416e01c6a6e8bd7b970244c70 /test/cedet/tests/testsubclass.cpp
parentc378d6c33f751d1a0b97958f3cacfe0b07c72f58 (diff)
downloademacs-22bbf7ca22f11cc33d887d0162cf2ec6661c3a3e.tar.gz
emacs-22bbf7ca22f11cc33d887d0162cf2ec6661c3a3e.zip
Rename all test files to reflect source layout.
* CONTRIBUTE,Makefile.in,configure.ac: Update to reflect test directory moves. * test/file-organisation.org: New file. * test/automated/Makefile.in test/automated/data/decompress/foo.gz test/automated/data/epg/pubkey.asc test/automated/data/epg/seckey.asc test/automated/data/files-bug18141.el.gz test/automated/data/flymake/test.c test/automated/data/flymake/test.pl test/automated/data/package/archive-contents test/automated/data/package/key.pub test/automated/data/package/key.sec test/automated/data/package/multi-file-0.2.3.tar test/automated/data/package/multi-file-readme.txt test/automated/data/package/newer-versions/archive-contents test/automated/data/package/newer-versions/new-pkg-1.0.el test/automated/data/package/newer-versions/simple-single-1.4.el test/automated/data/package/package-test-server.py test/automated/data/package/signed/archive-contents test/automated/data/package/signed/archive-contents.sig test/automated/data/package/signed/signed-bad-1.0.el test/automated/data/package/signed/signed-bad-1.0.el.sig test/automated/data/package/signed/signed-good-1.0.el test/automated/data/package/signed/signed-good-1.0.el.sig test/automated/data/package/simple-depend-1.0.el test/automated/data/package/simple-single-1.3.el test/automated/data/package/simple-single-readme.txt test/automated/data/package/simple-two-depend-1.1.el test/automated/abbrev-tests.el test/automated/auto-revert-tests.el test/automated/calc-tests.el test/automated/icalendar-tests.el test/automated/character-fold-tests.el test/automated/comint-testsuite.el test/automated/descr-text-test.el test/automated/electric-tests.el test/automated/cl-generic-tests.el test/automated/cl-lib-tests.el test/automated/eieio-test-methodinvoke.el test/automated/eieio-test-persist.el test/automated/eieio-tests.el test/automated/ert-tests.el test/automated/ert-x-tests.el test/automated/generator-tests.el test/automated/let-alist.el test/automated/map-tests.el test/automated/advice-tests.el test/automated/package-test.el test/automated/pcase-tests.el test/automated/regexp-tests.el test/automated/seq-tests.el test/automated/subr-x-tests.el test/automated/tabulated-list-test.el test/automated/thunk-tests.el test/automated/timer-tests.el test/automated/epg-tests.el test/automated/eshell.el test/automated/faces-tests.el test/automated/file-notify-tests.el test/automated/auth-source-tests.el test/automated/gnus-tests.el test/automated/message-mode-tests.el test/automated/help-fns.el test/automated/imenu-test.el test/automated/info-xref.el test/automated/mule-util.el test/automated/isearch-tests.el test/automated/json-tests.el test/automated/bytecomp-tests.el test/automated/coding-tests.el test/automated/core-elisp-tests.el test/automated/decoder-tests.el test/automated/files.el test/automated/font-parse-tests.el test/automated/lexbind-tests.el test/automated/occur-tests.el test/automated/process-tests.el test/automated/syntax-tests.el test/automated/textprop-tests.el test/automated/undo-tests.el test/automated/man-tests.el test/automated/completion-tests.el test/automated/dbus-tests.el test/automated/newsticker-tests.el test/automated/sasl-scram-rfc-tests.el test/automated/tramp-tests.el test/automated/obarray-tests.el test/automated/compile-tests.el test/automated/elisp-mode-tests.el test/automated/f90.el test/automated/flymake-tests.el test/automated/python-tests.el test/automated/ruby-mode-tests.el test/automated/subword-tests.el test/automated/replace-tests.el test/automated/simple-test.el test/automated/sort-tests.el test/automated/subr-tests.el test/automated/reftex-tests.el test/automated/sgml-mode-tests.el test/automated/tildify-tests.el test/automated/thingatpt.el test/automated/url-future-tests.el test/automated/url-util-tests.el test/automated/add-log-tests.el test/automated/vc-bzr.el test/automated/vc-tests.el test/automated/xml-parse-tests.el test/BidiCharacterTest.txt test/biditest.el test/cedet/cedet-utests.el test/cedet/ede-tests.el test/cedet/semantic-ia-utest.el test/cedet/semantic-tests.el test/cedet/semantic-utest-c.el test/cedet/semantic-utest.el test/cedet/srecode-tests.el test/cedet/tests/test.c test/cedet/tests/test.el test/cedet/tests/test.make test/cedet/tests/testdoublens.cpp test/cedet/tests/testdoublens.hpp test/cedet/tests/testfriends.cpp test/cedet/tests/testjavacomp.java test/cedet/tests/testnsp.cpp test/cedet/tests/testpolymorph.cpp test/cedet/tests/testspp.c test/cedet/tests/testsppcomplete.c test/cedet/tests/testsppreplace.c test/cedet/tests/testsppreplaced.c test/cedet/tests/testsubclass.cpp test/cedet/tests/testsubclass.hh test/cedet/tests/testtypedefs.cpp test/cedet/tests/testvarnames.c test/etags/CTAGS.good test/etags/ETAGS.good_1 test/etags/ETAGS.good_2 test/etags/ETAGS.good_3 test/etags/ETAGS.good_4 test/etags/ETAGS.good_5 test/etags/ETAGS.good_6 test/etags/a-src/empty.zz test/etags/a-src/empty.zz.gz test/etags/ada-src/2ataspri.adb test/etags/ada-src/2ataspri.ads test/etags/ada-src/etags-test-for.ada test/etags/ada-src/waroquiers.ada test/etags/c-src/a/b/b.c test/etags/c-src/abbrev.c test/etags/c-src/c.c test/etags/c-src/dostorture.c test/etags/c-src/emacs/src/gmalloc.c test/etags/c-src/emacs/src/keyboard.c test/etags/c-src/emacs/src/lisp.h test/etags/c-src/emacs/src/regex.h test/etags/c-src/etags.c test/etags/c-src/exit.c test/etags/c-src/exit.strange_suffix test/etags/c-src/fail.c test/etags/c-src/getopt.h test/etags/c-src/h.h test/etags/c-src/machsyscalls.c test/etags/c-src/machsyscalls.h test/etags/c-src/sysdep.h test/etags/c-src/tab.c test/etags/c-src/torture.c test/etags/cp-src/MDiagArray2.h test/etags/cp-src/Range.h test/etags/cp-src/burton.cpp test/etags/cp-src/c.C test/etags/cp-src/clheir.cpp.gz test/etags/cp-src/clheir.hpp test/etags/cp-src/conway.cpp test/etags/cp-src/conway.hpp test/etags/cp-src/fail.C test/etags/cp-src/functions.cpp test/etags/cp-src/screen.cpp test/etags/cp-src/screen.hpp test/etags/cp-src/x.cc test/etags/el-src/TAGTEST.EL test/etags/el-src/emacs/lisp/progmodes/etags.el test/etags/erl-src/gs_dialog.erl test/etags/f-src/entry.for test/etags/f-src/entry.strange.gz test/etags/f-src/entry.strange_suffix test/etags/forth-src/test-forth.fth test/etags/html-src/algrthms.html test/etags/html-src/index.shtml test/etags/html-src/software.html test/etags/html-src/softwarelibero.html test/etags/lua-src/allegro.lua test/etags/objc-src/PackInsp.h test/etags/objc-src/PackInsp.m test/etags/objc-src/Subprocess.h test/etags/objc-src/Subprocess.m test/etags/objcpp-src/SimpleCalc.H test/etags/objcpp-src/SimpleCalc.M test/etags/pas-src/common.pas test/etags/perl-src/htlmify-cystic test/etags/perl-src/kai-test.pl test/etags/perl-src/yagrip.pl test/etags/php-src/lce_functions.php test/etags/php-src/ptest.php test/etags/php-src/sendmail.php test/etags/prol-src/natded.prolog test/etags/prol-src/ordsets.prolog test/etags/ps-src/rfc1245.ps test/etags/pyt-src/server.py test/etags/tex-src/gzip.texi test/etags/tex-src/nonewline.tex test/etags/tex-src/testenv.tex test/etags/tex-src/texinfo.tex test/etags/y-src/atest.y test/etags/y-src/cccp.c test/etags/y-src/cccp.y test/etags/y-src/parse.c test/etags/y-src/parse.y test/indent/css-mode.css test/indent/js-indent-init-dynamic.js test/indent/js-indent-init-t.js test/indent/js-jsx.js test/indent/js.js test/indent/latex-mode.tex test/indent/modula2.mod test/indent/nxml.xml test/indent/octave.m test/indent/pascal.pas test/indent/perl.perl test/indent/prolog.prolog test/indent/ps-mode.ps test/indent/ruby.rb test/indent/scheme.scm test/indent/scss-mode.scss test/indent/sgml-mode-attribute.html test/indent/shell.rc test/indent/shell.sh test/redisplay-testsuite.el test/rmailmm.el test/automated/buffer-tests.el test/automated/cmds-tests.el test/automated/data-tests.el test/automated/finalizer-tests.el test/automated/fns-tests.el test/automated/inotify-test.el test/automated/keymap-tests.el test/automated/print-tests.el test/automated/libxml-tests.el test/automated/zlib-tests.el: Files Moved.
Diffstat (limited to 'test/cedet/tests/testsubclass.cpp')
-rw-r--r--test/cedet/tests/testsubclass.cpp249
1 files changed, 0 insertions, 249 deletions
diff --git a/test/cedet/tests/testsubclass.cpp b/test/cedet/tests/testsubclass.cpp
deleted file mode 100644
index 6dee867b794..00000000000
--- a/test/cedet/tests/testsubclass.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
1// testsubclass.cpp --- unit test for analyzer and complex C++ inheritance
2
3// Copyright (C) 2007-2015 Free Software Foundation, Inc.
4
5// Author: Eric M. Ludlam <eric@siege-engine.com>
6
7// This file is part of GNU Emacs.
8
9// GNU Emacs is free software: you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation, either version 3 of the License, or
12// (at your option) any later version.
13
14// GNU Emacs is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17// GNU General Public License for more details.
18
19// You should have received a copy of the GNU General Public License
20// along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22//#include <iostream>
23#include "testsubclass.hh"
24
25void animal::moose::setFeet(int numfeet) //^1^
26{
27 if (numfeet > 4) {
28 std::cerr << "Why would a moose have more than 4 feet?" << std::endl;
29 return;
30 }
31
32 fFeet = numfeet;
33}
34
35int animal::moose::getFeet() //^2^
36{
37 return fFeet;
38}
39
40void animal::moose::doNothing() //^3^
41{
42 animal::moose foo();
43
44 fFeet = N// -15-
45 ; // #15# ( "NAME1" "NAME2" "NAME3" )
46}
47
48
49void deer::moose::setAntlers(bool have_antlers) //^4^
50{
51 fAntlers = have_antlers;
52}
53
54bool deer::moose::getAntlers() //^5^
55// %1% ( ( "testsubclass.cpp" "testsubclass.hh" ) ( "deer::moose::doSomething" "deer::moose::getAntlers" "moose" ) )
56{
57 return fAntlers;
58}
59
60bool i_dont_have_symrefs()
61// %2% ( ("testsubclass.cpp" ) ("i_dont_have_symrefs"))
62{
63}
64
65void deer::moose::doSomething() //^6^
66{
67 // All these functions should be identified by semantic analyzer.
68 getAntlers();
69 setAntlers(true);
70
71 getFeet();
72 setFeet(true);
73
74 doNothing();
75
76 fSomeField = true;
77
78 fIsValid = true;
79}
80
81void deer::alces::setLatin(bool l) {
82 fLatin = l;
83}
84
85bool deer::alces::getLatin() {
86 return fLatin;
87}
88
89void deer::alces::doLatinStuff(moose moosein) {
90 // All these functions should be identified by semantic analyzer.
91 getFeet();
92 setFeet(true);
93
94 getLatin();
95 setLatin(true);
96
97 doNothing();
98
99 deer::moose foo();
100
101
102}
103
104moose deer::alces::createMoose()
105{
106 moose MooseVariableName;
107 bool tmp;
108 int itmp;
109 bool fool;
110 int fast;
111
112 MooseVariableName = createMoose();
113
114 doLatinStuff(MooseVariableName);
115
116 tmp = this.f// -1-
117 // #1# ( "fAlcesBool" "fIsValid" "fLatin" )
118 ;
119
120 itmp = this.f// -2-
121 // #2# ( "fAlcesInt" "fGreek" "fIsProtectedInt" )
122 ;
123
124 tmp = f// -3-
125 // #3# ( "fAlcesBool" "fIsValid" "fLatin" "fool" )
126 ;
127
128 itmp = f// -4-
129 // #4# ( "fAlcesInt" "fGreek" "fIsProtectedInt" "fast" )
130 ;
131
132 MooseVariableName = m// -5-
133 // #5# ( "moose" )
134
135 return MooseVariableName;
136}
137
138/** Test Scope Changes
139 *
140 * This function is rigged to make sure the scope changes to account
141 * for different locations in local variable parsing.
142 */
143int someFunction(int mPickle)
144{
145 moose mMoose = deer::alces::createMoose();
146
147 if (mPickle == 1) {
148
149 int mOption1 = 2;
150
151 m// -5-
152 // #5# ( "mMoose" "mOption1" "mPickle" )
153 ;
154
155 } else {
156
157 int mOption2 = 2;
158
159 m// -6-
160 // #6# ( "mMoose" "mOption2" "mPickle" )
161 ;
162 }
163
164}
165
166// Thanks Ming-Wei Chang for this next example.
167
168namespace pub_priv {
169
170 class A{
171 private:
172 void private_a(){}
173 public:
174 void public_a();
175 };
176
177 void A::public_a() {
178 A other_a;
179
180 other_a.p// -7-
181 // #7# ( "private_a" "public_a" )
182 ;
183 }
184
185 int some_regular_function(){
186 A a;
187 a.p// -8-
188 // #8# ( "public_a" )
189 ;
190 return 0;
191 }
192
193}
194
195
196/** Test Scope w/in a function (non-method) with classes using
197 * different levels of inheritance.
198 */
199int otherFunction()
200{
201 sneaky::antelope Antelope(1);
202 sneaky::jackalope Jackalope(1);
203 sneaky::bugalope Bugalope(1);
204
205 Antelope.// -9-
206 // #9# ( "fAntyPublic" "fQuadPublic" "testAccess")
207 ;
208
209 Jackalope.// -10-
210 // #10# ( "fBunnyPublic" "testAccess")
211 ;
212
213 Jackalope// @1@ 6
214 ;
215 Jackalope;
216 Jackalope;
217 Jackalope;
218
219 Bugalope.// -11-
220 // #11# ( "fBugPublic" "testAccess")
221 ;
222 Bugalope// @2@ 3
223 ;
224}
225
226/** Test methods within each class for types of access to the baseclass.
227 */
228
229bool sneaky::antelope::testAccess() //^7^
230{
231 this.// -12-
232 // #12# ( "fAntyPrivate" "fAntyProtected" "fAntyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
233 ;
234}
235
236bool sneaky::jackalope::testAccess() //^8^
237{
238 this.// -13-
239 // #13# ( "fBunnyPrivate" "fBunnyProtected" "fBunnyPublic" "fQuadProtected" "fQuadPublic" "testAccess" )
240 ;
241}
242
243bool sneaky::bugalope::testAccess() //^9^
244{
245 this.// -14-
246 // #14# ( "fBugPrivate" "fBugProtected" "fBugPublic" "fQuadPublic" "testAccess" )
247 ;
248}
249