Mercurial > emacs
annotate test/cedet/tests/testvarnames.c @ 108252:623b349bb7c2
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 06 May 2010 03:24:12 +0000 |
parents | 89eccb374dec |
children | 376148b31b5e |
rev | line source |
---|---|
107698
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
1 /* testvarnames.cpp |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
2 Test variable and function names, lists of variables on one line, etc. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
3 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
4 Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
5 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
6 Author: Eric M. Ludlam <eric@siege-engine.com> |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
7 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
8 This file is part of GNU Emacs. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
9 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
10 GNU Emacs is free software: you can redistribute it and/or modify |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
11 it under the terms of the GNU General Public License as published by |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
12 the Free Software Foundation, either version 3 of the License, or |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
13 (at your option) any later version. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
14 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
15 GNU Emacs is distributed in the hope that it will be useful, |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
16 but WITHOUT ANY WARRANTY; without even the implied warranty of |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
18 GNU General Public License for more details. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
19 |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
20 You should have received a copy of the GNU General Public License |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
21 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
89eccb374dec
Update Semantic test copyrights, delete some test files (Bug#4656).
Chong Yidong <cyd@stupidchicken.com>
parents:
105377
diff
changeset
|
22 */ |
104494 | 23 |
24 struct independent { | |
25 int indep_1; | |
26 int indep_2; | |
27 }; | |
28 | |
29 struct independent var_indep_struct; | |
30 | |
31 struct { | |
32 int unnamed_1; | |
33 int unnamed_2; | |
34 } var_unamed_struct; | |
35 | |
36 struct { | |
37 int unnamed_3; | |
38 int unnamed_4; | |
39 } var_un_2, var_un_3; | |
40 | |
41 struct inlinestruct { | |
42 int named_1; | |
43 int named_2; | |
44 } var_named_struct; | |
45 | |
46 struct inline2struct { | |
47 int named_3; | |
48 int named_4; | |
49 } var_n_2, var_n_3; | |
50 | |
51 /* Structures with names that then declare variables | |
52 * should also be completable. | |
53 * | |
54 * Getting this to work is the bugfix in semantic-c.el CVS v 1.122 | |
55 */ | |
56 struct inlinestruct in_var1; | |
57 struct inline2struct in_var2; | |
58 | |
59 int test_1(int var_arg1) { | |
60 | |
61 var_// -1- | |
62 ; // #1# ("var_arg1" "var_indep_struct" "var_n_2" "var_n_3" "var_named_struct" "var_un_2" "var_un_3" "var_unamed_struct") | |
63 | |
64 var_indep_struct.// -2- | |
65 ; // #2# ( "indep_1" "indep_2" ) | |
66 | |
67 var_unamed_struct.// -3- | |
68 ; // #3# ( "unnamed_1" "unnamed_2" ) | |
69 | |
70 var_named_struct.// -4- | |
71 ; // #4# ( "named_1" "named_2" ) | |
72 | |
73 var_un_2.// -5- | |
74 ; // #5# ( "unnamed_3" "unnamed_4" ) | |
75 var_un_3.// -6- | |
76 ; // #6# ( "unnamed_3" "unnamed_4" ) | |
77 | |
78 var_n_2.// -7- | |
79 ; // #7# ( "named_3" "named_4" ) | |
80 var_n_3.// -8- | |
81 ; // #8# ( "named_3" "named_4" ) | |
82 | |
83 in_// -9- | |
84 ; // #9# ( "in_var1" "in_var2" ) | |
85 | |
86 in_var1.// -10- | |
87 ; // #10# ( "named_1" "named_2") | |
88 in_var2.// -11- | |
89 ; // #11# ( "named_3" "named_4") | |
90 } | |
105377 | 91 |
92 /* arch-tag: ca9f23e9-0c66-4a5e-b233-3fdc841d3a63 | |
93 (do not change this comment) */ |