aboutsummaryrefslogtreecommitdiffstats
path: root/test/cedet/tests/testtemplates.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/cedet/tests/testtemplates.cpp')
-rw-r--r--test/cedet/tests/testtemplates.cpp92
1 files changed, 0 insertions, 92 deletions
diff --git a/test/cedet/tests/testtemplates.cpp b/test/cedet/tests/testtemplates.cpp
deleted file mode 100644
index 4e0f0e4abfa..00000000000
--- a/test/cedet/tests/testtemplates.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
1// Templates Test file:
2// Written by 'Raf'
3
4template <class T, int U, class V>
5class read_ref {
6public:
7 const T* read_ref_member_one( T);
8 const V* read_ref_member_two();
9};
10
11namespace NS {
12 template <class T, int U, class V>
13 class ref {
14 public:
15 read_ref<T,10,V> operator->() {
16 m_// -1-
17 ;
18 // #1# ( "m_datas" )
19 }
20
21 private:
22 T m_datas[U];
23 };
24
25}
26
27class FooOne {
28public:
29 int fooOneMember();
30};
31
32class FooTwo {
33public:
34 int fooTwoMember();
35};
36
37class FooThree {
38public:
39 int fooThreeMember();
40
41 FooOne * operator->();
42};
43
44typedef ref<FooOne, 10,FooTwo> Test;
45
46using NS;
47
48void
49main(void) {
50 ref<FooOne, 10, FooTwo> v;
51
52 v->read_ref_member_one()-> // -2-
53 ;
54 // #2# ( "fooOneMember" )
55
56 v->read_ref_member_two()-> // -3-
57 ;
58 // #3# ( "fooTwoMember" )
59
60 v-> // -4-
61 ;
62 // #4# ( "read_ref_member_one" "read_ref_member_two" )
63
64 Test t;
65
66 t->read_ref_member_two()-> // -5-
67 ;
68 // #5# ( "fooTwoMember" )
69
70 ref<FooOne, 10, FooThree> v2;
71
72 v2->read_ref_member_two()-> // -6-
73 ;
74 // #6# ( "fooOneMember" )
75
76 /* Try all these things by also specifying the namespace in the name. */
77 NS::ref<FooOne, 10, FooTwo> v3;
78
79 v3->read_ref_member_one()-> // -7-
80 ;
81 // #7# ( "fooOneMember" )
82
83 v3->read_ref_member_two()-> // -8-
84 ;
85 // #8# ( "fooTwoMember" )
86
87 v3->read_ref_member_two// @1@ 5
88 ;
89
90}
91
92// arch-tag: 03cbb8c3-3d01-42ab-b416-42a08ea7b896