aboutsummaryrefslogtreecommitdiffstats
path: root/test/cedet/tests/testusing.cpp
diff options
context:
space:
mode:
authorChong Yidong2010-03-29 17:26:49 -0400
committerChong Yidong2010-03-29 17:26:49 -0400
commita4100ebe291e4d2aca4dd8178e7632ba87f7a65e (patch)
tree974cde909168950c49e79efea01558e68e434789 /test/cedet/tests/testusing.cpp
parentfe59d70512322e7001ffd772f5e74c7302b7e1d5 (diff)
downloademacs-a4100ebe291e4d2aca4dd8178e7632ba87f7a65e.tar.gz
emacs-a4100ebe291e4d2aca4dd8178e7632ba87f7a65e.zip
Update Semantic test copyrights, delete some test files (Bug#4656).
* cedet/tests/test.cpp: * cedet/tests/test.py: * cedet/tests/teststruct.cpp: * cedet/tests/testtemplates.cpp: * cedet/tests/testusing.cpp: * cedet/tests/scopetest.cpp: * cedet/tests/scopetest.java: Files deleted. * cedet/tests/test.make: * cedet/tests/test.c: * cedet/tests/testjavacomp.java: * cedet/tests/testspp.c: * cedet/tests/testsppreplace.c: * cedet/tests/testsppreplaced.c: * cedet/tests/testsubclass.cpp: * cedet/tests/testsubclass.hh: * cedet/tests/testtypedefs.cpp: * cedet/tests/testvarnames.c: * cedet/tests/test.el: * cedet/tests/testdoublens.cpp: * cedet/tests/testdoublens.hpp: Add copyright header. * cedet/semantic-tests.el (semanticdb-test-gnu-global): Remove reference to deleted files.
Diffstat (limited to 'test/cedet/tests/testusing.cpp')
-rw-r--r--test/cedet/tests/testusing.cpp134
1 files changed, 0 insertions, 134 deletions
diff --git a/test/cedet/tests/testusing.cpp b/test/cedet/tests/testusing.cpp
deleted file mode 100644
index 3bd95a38113..00000000000
--- a/test/cedet/tests/testusing.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
1// Test using statements in C++
2
3#include <adstdio.h>
4
5#include <testusing.hh>
6
7namespace moose {
8
9 class MyClass;
10 class Point;
11
12 typedef MyClass snerk;
13}
14
15namespace moose {
16
17 class Point;
18 class MyClass;
19
20}
21
22namespace {
23
24 int global_variable = 0;
25
26};
27
28using moose::MyClass;
29
30void someFcn() {
31
32 MyClass f;
33
34 f.//-1-
35 ; //#1# ( "getVal" "setVal" )
36
37}
38
39// Code from Zhiqiu Kong
40
41namespace panda {
42
43 using namespace bread_name;
44
45 int func()
46 {
47 bread test;
48 test.//-2-
49 ;// #2# ( "geta" )
50 return 0;
51 }
52}
53
54// Local using statements and aliased types
55// Code from David Engster
56
57void func2()
58{
59 using namespace somestuff;
60 OneClass f;
61 f.//-3-
62 ; //#3# ( "aFunc" "anInt" )
63}
64
65void func3()
66{
67 using somestuff::OneClass;
68 OneClass f;
69 f.//-4-
70 ; //#4# ( "aFunc" "anInt" )
71}
72
73// Dereferencing alias types created through 'using' statements
74
75// Alias with fully qualified name
76void func4()
77{
78 otherstuff::OneClass f;
79 f. //-5-
80 ; //#5# ( "aFunc" "anInt" )
81}
82
83// Alias through namespace directive
84void func5()
85{
86 using namespace otherstuff;
87 OneClass f;
88 f. //-6-
89 ; //#6# ( "aFunc" "anInt" )
90}
91
92// Check name hiding
93void func6()
94{
95 using namespace morestuff;
96 OneClass f; // Alias for somestuff::OneClass
97 f. //-7-
98 ; //#7# ( "aFunc" "anInt" )
99 aStruct g; // This however is morestuff::aStruct !
100 g. //-8-
101 ; //#8# ( "anotherBar" "anotherFoo" )
102}
103
104// Alias of an alias
105// Currently doesn't work interactively for some reason.
106void func6()
107{
108 using namespace evenmorestuff;
109 OneClass f;
110 f. //-7-
111 ; //#7# ( "aFunc" "anInt" )
112}
113
114// Alias for struct in nested namespace, fully qualified
115void func7()
116{
117 outer::StructNested f;
118 f.//-8-
119 ; //#8# ( "one" "two" )
120}
121
122// Alias for nested namespace
123void func8()
124{
125 using namespace outerinner;
126 StructNested f;
127 AnotherStruct g;
128 f.//-9-
129 ; //#9# ( "one" "two" )
130 g.//-10-
131 ; //#10# ( "four" "three" )
132}
133
134// arch-tag: 8e68d5d1-4d48-47c6-a910-d8d6b66b2768