aboutsummaryrefslogtreecommitdiffstats
path: root/test/cedet/tests/testusing.hh
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.hh
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.hh')
-rw-r--r--test/cedet/tests/testusing.hh127
1 files changed, 0 insertions, 127 deletions
diff --git a/test/cedet/tests/testusing.hh b/test/cedet/tests/testusing.hh
deleted file mode 100644
index 4c91bf0db24..00000000000
--- a/test/cedet/tests/testusing.hh
+++ /dev/null
@@ -1,127 +0,0 @@
1// test usings header file.
2
3namespace moose {
4
5 class Point;
6
7 class MyClass;
8
9}
10
11
12namespace moose {
13
14 class Point;
15
16 class MyClass {
17 public:
18 MyClass() : fVal(0) {
19 }
20
21 ~MyClass() {};
22
23 /**
24 * fVal Accessors
25 * @{
26 */
27 int getVal() const {
28 return fVal;
29 }
30 void setVal(int Val) const {
31 fVal = Val;
32 }
33 /**
34 * @}
35 */
36 private:
37 int fVal;
38 };
39
40}
41
42namespace deer {
43
44 class Pickle;
45
46};
47
48// Code from Zhiqiu Kong
49
50#ifndef BREAD_H
51#define BREAD_H
52
53namespace bread_name {
54 class bread
55 {
56 public:
57 void geta();
58 private:
59 int m_a;
60 int m_b;
61 };
62}
63
64#endif
65
66// Code from David Engster
67// Creating alias types through 'using' trickery
68
69namespace somestuff {
70 class OneClass {
71 public:
72 void aFunc();
73 int anInt;
74 };
75 struct aStruct {
76 int foo;
77 int bar;
78 };
79}
80
81namespace otherstuff {
82 // make otherstuff::OneClass an alias for somestuff::OneClass
83 using somestuff::OneClass;
84}
85
86namespace morestuff {
87 // make morestuff an alias namespace for somestuff
88 using namespace somestuff;
89 // but hide aStruct with own type
90 struct aStruct {
91 int anotherFoo;
92 int anotherBar;
93 };
94}
95
96// We can also create an alias for an alias
97namespace evenmorestuff {
98 using otherstuff::OneClass;
99}
100
101// Now with nested namespaces
102namespace outer {
103 namespace inner {
104 struct StructNested {
105 int one;
106 int two;
107 };
108 struct AnotherStruct {
109 int three;
110 int four;
111 };
112 }
113}
114
115// Elevate the first struct into 'outer'
116// so that we can access it via 'outer::StructNested'
117namespace outer {
118 using outer::inner::StructNested;
119}
120
121// Create an alias for a nested namespace
122namespace outerinner {
123 // equivalent to 'namespace outerinner = outer::inner;'
124 using namespace outer::inner;
125}
126
127// arch-tag: f7e59fad-100b-47d3-ae8b-a8390a026ade