]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/function/doc/tests.xml
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / function / doc / tests.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
4
5 Distributed under the Boost Software License, Version 1.0.
6 (See accompanying file LICENSE_1_0.txt or copy at
7 http://www.boost.org/LICENSE_1_0.txt)
8 -->
9 <!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
10 "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
11 <testsuite id="function.testsuite" last-revision="$Date$">
12 <run-test filename="function_test.cpp" name="lib_function_test">
13 <purpose><para>Test the capabilities of the <classname>boost::function</classname> class template.</para></purpose>
14 <if-fails><para>The <classname>boost::function</classname> class template may not be usable on your compiler. However, the library may still be usable via the <classname>boost::functionN</classname> class templates.</para></if-fails>
15 </run-test>
16
17 <run-test filename="function_n_test.cpp">
18 <purpose><para>Test the capabilities of the <classname>boost::functionN</classname> class templates.</para></purpose>
19 </run-test>
20
21 <run-test filename="allocator_test.cpp">
22 <purpose><para>Test the use of custom allocators.</para></purpose>
23 <if-fails><para>Allocators are ignored by the implementation.</para></if-fails>
24 </run-test>
25
26 <run-test filename="stateless_test.cpp">
27 <purpose><para>Test the optimization of stateless function objects in the Boost.Function library.</para></purpose>
28 <if-fails><para>The exception-safety and performance guarantees given for stateless function objects may not be met by the implementation.</para></if-fails>
29 </run-test>
30
31 <run-test filename="lambda_test.cpp">
32 <purpose><para>Test the interaction between Boost.Function and Boost.Lambda.</para></purpose>
33 <if-fails><para>Either Boost.Lambda does not work on the platform, or Boost.Function cannot safely be applied without the use of <functionname>boost::unlambda</functionname>.</para></if-fails>
34 </run-test>
35
36 <run-test filename="contains_test.cpp">
37 <purpose><para>Test the operation of the
38 <code><methodname>target</methodname></code> member function and the
39 equality operators.</para></purpose>
40 </run-test>
41
42 <compile-fail-test filename="function_test_fail1.cpp">
43 <purpose><para>Test the (incorrect!) use of comparisons between Boost.Function function objects.</para></purpose>
44 <if-fails><para>Intuitive (but incorrect!) code may compile and will give meaningless results.</para></if-fails>
45 </compile-fail-test>
46
47 <compile-fail-test filename="function_test_fail2.cpp">
48 <purpose><para>Test the use of an incompatible function object with Boost.Function</para></purpose>
49 <if-fails><para>Incorrect code may compile (with potentially unexpected results).</para></if-fails>
50 </compile-fail-test>
51
52 <compile-test filename="function_30.cpp">
53 <purpose><para>Test the generation of a Boost.Function function object adaptor accepting 30 arguments.</para></purpose>
54 <if-fails><para>The Boost.Function library may work for function object adaptors of up to 10 parameters, but will be unable to generate adaptors for an arbitrary number of parameters. Failure often indicates an error in the compiler's preprocessor.</para></if-fails>
55 </compile-test>
56
57 <run-test filename="function_arith_cxx98.cpp">
58 <source>
59 <![CDATA[
60 #include <boost/function.hpp>
61 #include <iostream>
62 ]]>
63
64 <snippet name="function.tutorial.mul_ints"/>
65 <snippet name="function.tutorial.int_div"/>
66
67 int main()
68 {
69 <snippet name="function.tutorial.arith.cxx98"/>
70 <snippet name="function.tutorial.use_int_div"/>
71 <snippet name="function.tutorial.call_int_div"/>
72 <snippet name="function.tutorial.check_empty"/>
73 <snippet name="function.tutorial.clear"/>
74 <snippet name="function.tutorial.use_mul_ints"/>
75
76 return 0;
77 }
78 </source>
79 <purpose><para>Test the first tutorial example.</para></purpose>
80 </run-test>
81
82 <run-test filename="function_arith_portable.cpp">
83 <source>
84 <![CDATA[
85 #include <boost/function.hpp>
86 #include <iostream>
87 ]]>
88 <snippet name="function.tutorial.mul_ints"/>
89 <snippet name="function.tutorial.int_div"/>
90 int main()
91 {
92 <snippet name="function.tutorial.arith.portable"/>
93 <snippet name="function.tutorial.use_int_div"/>
94 <snippet name="function.tutorial.call_int_div"/>
95 <snippet name="function.tutorial.check_empty"/>
96 <snippet name="function.tutorial.clear"/>
97 <snippet name="function.tutorial.use_mul_ints"/>
98
99 return 0;
100 }
101 </source>
102 <purpose><para>Test the first tutorial example.</para></purpose>
103 </run-test>
104
105 <run-test filename="sum_avg_cxx98.cpp">
106 <source>
107 <![CDATA[
108 #include <boost/function.hpp>
109 #include <iostream>
110 ]]>
111 <snippet name="function.tutorial.sum_avg"/>
112 int main()
113 {
114 <snippet name="function.tutorial.sum_avg_decl.cxx98"/>
115 <snippet name="function.tutorial.use_sum_avg"/>
116
117 return 0;
118 }
119 </source>
120 <purpose><para>Test the second tutorial example.</para></purpose>
121 </run-test>
122
123 <run-test filename="sum_avg_portable.cpp">
124 <source>
125 <![CDATA[
126 #include <boost/function.hpp>
127 #include <iostream>
128 ]]>
129 <snippet name="function.tutorial.sum_avg"/>
130 int main()
131 {
132 <snippet name="function.tutorial.sum_avg_decl.portable"/>
133 <snippet name="function.tutorial.use_sum_avg"/>
134
135 return 0;
136 }
137 </source>
138 <purpose><para>Test the second tutorial example.</para></purpose>
139 </run-test>
140
141 <run-test filename="mem_fun_cxx98.cpp">
142 <source>
143 <![CDATA[
144 #include <boost/function.hpp>
145 #include <iostream>
146 #include <functional>
147 ]]>
148 <snippet name="function.tutorial.X"/>
149 int X::foo(int x) { return -x; }
150
151 int main()
152 {
153 <snippet name="function.tutorial.mem_fun.cxx98"/>
154
155 return 0;
156 }
157 </source>
158 <purpose><para>Test member function example from tutorial.</para></purpose>
159 </run-test>
160
161 <run-test filename="mem_fun_portable.cpp">
162 <source>
163 <![CDATA[
164 #include <boost/function.hpp>
165 #include <iostream>
166 #include <functional>
167 ]]>
168 <snippet name="function.tutorial.X"/>
169 int X::foo(int x) { return -x; }
170
171 int main()
172 {
173 <snippet name="function.tutorial.mem_fun.portable"/>
174
175 return 0;
176 }
177 </source>
178 <purpose><para>Test member function example from tutorial.</para></purpose>
179 </run-test>
180
181 <run-test filename="std_bind_cxx98.cpp">
182 <source>
183 <![CDATA[
184 #include <boost/function.hpp>
185 #include <iostream>
186 #include <functional>
187 ]]>
188 <snippet name="function.tutorial.X"/>
189 int X::foo(int x) { return -x; }
190
191 int main()
192 {
193 <snippet name="function.tutorial.std_bind.cxx98"/>
194
195 return 0;
196 }
197 </source>
198 <purpose><para>Test standard binders example from tutorial.</para></purpose>
199 </run-test>
200
201 <run-test filename="std_bind_portable.cpp">
202 <source>
203 <![CDATA[
204 #include <boost/function.hpp>
205 #include <iostream>
206 #include <functional>
207 ]]>
208 <snippet name="function.tutorial.X"/>
209 int X::foo(int x) { return -x; }
210
211 int main()
212 {
213 <snippet name="function.tutorial.std_bind.portable"/>
214
215 return 0;
216 }
217 </source>
218 <purpose><para>Test standard binders example from tutorial.</para></purpose>
219 </run-test>
220
221 <run-test filename="function_ref_cxx98.cpp">
222 <source>
223 <![CDATA[
224 #include <boost/function.hpp>
225 #include <iostream>
226 ]]>
227
228 struct stateful_type { int operator()(int) const { return 0; } };
229
230 int main()
231 {
232 <snippet name="function.tutorial.ref.cxx98"/>
233
234 return 0;
235 }
236 </source>
237 <purpose><para>Test <functionname>boost::ref</functionname> example from tutorial.</para></purpose>
238 </run-test>
239
240 <run-test filename="function_ref_portable.cpp">
241 <source>
242 <![CDATA[
243 #include <boost/function.hpp>
244 #include <iostream>
245 ]]>
246
247 struct stateful_type { int operator()(int) const { return 0; } };
248
249 int main()
250 {
251 <snippet name="function.tutorial.ref.portable"/>
252
253 return 0;
254 }
255 </source>
256 <purpose><para>Test <functionname>boost::ref</functionname> example from tutorial.</para></purpose>
257 </run-test>
258 </testsuite>