1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.tests
.request
;
16 import junit
.framework
.TestCase
;
18 import org
.eclipse
.linuxtools
.internal
.tmf
.core
.request
.TmfCoalescedDataRequest
;
19 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
20 import org
.eclipse
.linuxtools
.tmf
.core
.request
.TmfDataRequest
;
21 import org
.eclipse
.linuxtools
.tmf
.tests
.stubs
.request
.TmfDataRequestStub
;
24 * <b><u>TmfCoalescedDataRequestTest</u></b>
26 * Test suite for the TmfCoalescedDataRequest class.
28 @SuppressWarnings({ "nls" })
29 public class TmfCoalescedDataRequestTest
extends TestCase
{
31 // ------------------------------------------------------------------------
33 // ------------------------------------------------------------------------
35 private TmfCoalescedDataRequest
<TmfEvent
> fRequest1
;
36 private TmfCoalescedDataRequest
<TmfEvent
> fRequest2
;
37 private TmfCoalescedDataRequest
<TmfEvent
> fRequest3
;
38 private TmfCoalescedDataRequest
<TmfEvent
> fRequest4
;
40 private TmfCoalescedDataRequest
<TmfEvent
> fRequest1b
;
41 private TmfCoalescedDataRequest
<TmfEvent
> fRequest1c
;
43 private int fRequestCount
;
45 // ------------------------------------------------------------------------
47 // ------------------------------------------------------------------------
49 public TmfCoalescedDataRequestTest(String name
) {
54 public void setUp() throws Exception
{
56 TmfDataRequest
.reset();
57 fRequest1
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
58 fRequest2
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 20, 100, 200);
59 fRequest3
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 20, 200, 200);
60 fRequest4
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 20, 200, 300);
62 fRequest1b
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
63 fRequest1c
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
65 fRequestCount
= fRequest1c
.getRequestId() + 1;
69 public void tearDown() throws Exception
{
73 private TmfCoalescedDataRequest
<TmfEvent
> setupTestRequest(final boolean[] flags
) {
75 TmfCoalescedDataRequest
<TmfEvent
> request
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200) {
77 public void handleCompleted() {
78 super.handleCompleted();
82 public void handleSuccess() {
83 super.handleSuccess();
87 public void handleFailure() {
88 super.handleFailure();
92 public void handleCancel() {
100 // ------------------------------------------------------------------------
102 // ------------------------------------------------------------------------
104 public void testTmfCoalescedDataRequest() {
105 TmfCoalescedDataRequest
<TmfEvent
> request
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class);
107 assertEquals("getRequestId", fRequestCount
++, request
.getRequestId());
108 assertEquals("getDataType", TmfEvent
.class, request
.getDataType());
110 assertEquals("getIndex", 0, request
.getIndex());
111 assertEquals("getNbRequestedEvents", TmfDataRequest
.ALL_DATA
, request
.getNbRequested());
113 assertFalse("isCompleted", request
.isCompleted());
114 assertFalse("isFailed", request
.isFailed());
115 assertFalse("isCancelled", request
.isCancelled());
117 assertEquals("getNbRead", 0, request
.getNbRead());
120 public void testTmfCoalescedDataRequestIndex() {
121 TmfCoalescedDataRequest
<TmfEvent
> request
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10);
123 assertEquals("getRequestId", fRequestCount
++, request
.getRequestId());
124 assertEquals("getDataType", TmfEvent
.class, request
.getDataType());
126 assertEquals("getIndex", 10, request
.getIndex());
127 assertEquals("getNbRequestedEvents", TmfDataRequest
.ALL_DATA
, request
.getNbRequested());
129 assertFalse("isCompleted", request
.isCompleted());
130 assertFalse("isFailed", request
.isFailed());
131 assertFalse("isCancelled", request
.isCancelled());
133 assertEquals("getNbRead", 0, request
.getNbRead());
136 public void testTmfCoalescedDataRequestIndexNbRequested() {
137 TmfCoalescedDataRequest
<TmfEvent
> request
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100);
139 assertEquals("getRequestId", fRequestCount
++, request
.getRequestId());
140 assertEquals("getDataType", TmfEvent
.class, request
.getDataType());
142 assertEquals("getIndex", 10, request
.getIndex());
143 assertEquals("getNbRequestedEvents", 100, request
.getNbRequested());
145 assertFalse("isCompleted", request
.isCompleted());
146 assertFalse("isFailed", request
.isFailed());
147 assertFalse("isCancelled", request
.isCancelled());
149 assertEquals("getNbRead", 0, request
.getNbRead());
152 public void testTmfCoalescedDataRequestIndexNbEventsBlocksize() {
153 TmfCoalescedDataRequest
<TmfEvent
> request
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
155 assertEquals("getRequestId", fRequestCount
++, request
.getRequestId());
156 assertEquals("getDataType", TmfEvent
.class, request
.getDataType());
158 assertEquals("getIndex", 10, request
.getIndex());
159 assertEquals("getNbRequestedEvents", 100, request
.getNbRequested());
161 assertFalse("isCompleted", request
.isCompleted());
162 assertFalse("isFailed", request
.isFailed());
163 assertFalse("isCancelled", request
.isCancelled());
165 assertEquals("getNbRead", 0, request
.getNbRead());
168 // ------------------------------------------------------------------------
170 // ------------------------------------------------------------------------
172 public void testEqualsReflexivity() throws Exception
{
173 assertTrue("equals", fRequest1
.equals(fRequest1
));
174 assertTrue("equals", fRequest2
.equals(fRequest2
));
176 assertFalse("equals", fRequest1
.equals(fRequest2
));
177 assertFalse("equals", fRequest2
.equals(fRequest1
));
180 public void testEqualsSymmetry() throws Exception
{
181 assertTrue("equals", fRequest1
.equals(fRequest1b
));
182 assertTrue("equals", fRequest1b
.equals(fRequest1
));
184 assertFalse("equals", fRequest1
.equals(fRequest3
));
185 assertFalse("equals", fRequest2
.equals(fRequest3
));
186 assertFalse("equals", fRequest3
.equals(fRequest1
));
187 assertFalse("equals", fRequest3
.equals(fRequest2
));
190 public void testEqualsTransivity() throws Exception
{
191 assertTrue("equals", fRequest1
.equals(fRequest1b
));
192 assertTrue("equals", fRequest1b
.equals(fRequest1c
));
193 assertTrue("equals", fRequest1
.equals(fRequest1c
));
196 public void testEqualsNull() throws Exception
{
197 assertFalse("equals", fRequest1
.equals(null));
198 assertFalse("equals", fRequest2
.equals(null));
201 // ------------------------------------------------------------------------
203 // ------------------------------------------------------------------------
205 public void testHashCode() throws Exception
{
206 assertTrue("hashCode", fRequest1
.hashCode() == fRequest1
.hashCode());
207 assertTrue("hashCode", fRequest2
.hashCode() == fRequest2
.hashCode());
208 assertTrue("hashCode", fRequest1
.hashCode() != fRequest2
.hashCode());
211 // ------------------------------------------------------------------------
213 // ------------------------------------------------------------------------
215 public void testToString() {
216 String expected1
= "[TmfCoalescedDataRequest(0,TmfEvent,10,100,200)]";
217 String expected2
= "[TmfCoalescedDataRequest(1,TmfEvent,20,100,200)]";
218 String expected3
= "[TmfCoalescedDataRequest(2,TmfEvent,20,200,200)]";
219 String expected4
= "[TmfCoalescedDataRequest(3,TmfEvent,20,200,300)]";
221 assertEquals("toString", expected1
, fRequest1
.toString());
222 assertEquals("toString", expected2
, fRequest2
.toString());
223 assertEquals("toString", expected3
, fRequest3
.toString());
224 assertEquals("toString", expected4
, fRequest4
.toString());
227 // ------------------------------------------------------------------------
229 // ------------------------------------------------------------------------
231 public void testIsCompatible() {
232 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
233 TmfDataRequest
<TmfEvent
> request1
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
234 TmfDataRequest
<TmfEvent
> request2
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 100, 200);
235 TmfDataRequest
<TmfEvent
> request3
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 4, 200);
236 TmfDataRequest
<TmfEvent
> request4
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 5, 200);
237 TmfDataRequest
<TmfEvent
> request5
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 15, 100, 200);
238 TmfDataRequest
<TmfEvent
> request6
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 100, 100, 200);
239 TmfDataRequest
<TmfEvent
> request7
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 110, 100, 200);
240 TmfDataRequest
<TmfEvent
> request8
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 111, 100, 200);
242 assertTrue("isCompatible", coalescedRequest
.isCompatible(request1
));
243 assertTrue("isCompatible", coalescedRequest
.isCompatible(request2
));
244 assertTrue("isCompatible", coalescedRequest
.isCompatible(request3
));
245 assertTrue("isCompatible", coalescedRequest
.isCompatible(request4
));
246 assertTrue("isCompatible", coalescedRequest
.isCompatible(request5
));
247 assertTrue("isCompatible", coalescedRequest
.isCompatible(request6
));
248 assertTrue("isCompatible", coalescedRequest
.isCompatible(request7
));
249 assertTrue("isCompatible", coalescedRequest
.isCompatible(request8
));
251 TmfDataRequest
<TmfEvent
> request9
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 3, 200);
252 TmfDataRequest
<TmfEvent
> request10
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 112, 100, 200);
254 assertFalse("isCompatible", coalescedRequest
.isCompatible(request9
));
255 assertFalse("isCompatible", coalescedRequest
.isCompatible(request10
));
258 // ------------------------------------------------------------------------
260 // ------------------------------------------------------------------------
262 public void testAddRequest1() {
263 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
264 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
266 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
267 coalescedRequest
.addRequest(request
);
268 assertEquals("addRequest", 10, coalescedRequest
.getIndex());
269 assertEquals("addRequest", 100, coalescedRequest
.getNbRequested());
270 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
273 public void testAddRequest2() {
274 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
275 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 100, 200);
277 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
278 coalescedRequest
.addRequest(request
);
279 assertEquals("addRequest", 5, coalescedRequest
.getIndex());
280 assertEquals("addRequest", 105, coalescedRequest
.getNbRequested());
281 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
284 public void testAddRequest3() {
285 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
286 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 4, 200);
288 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
289 coalescedRequest
.addRequest(request
);
290 assertEquals("addRequest", 5, coalescedRequest
.getIndex());
291 assertEquals("addRequest", 105, coalescedRequest
.getNbRequested());
292 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
295 public void testAddRequest4() {
296 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
297 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 5, 5, 200);
299 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
300 coalescedRequest
.addRequest(request
);
301 assertEquals("addRequest", 5, coalescedRequest
.getIndex());
302 assertEquals("addRequest", 105, coalescedRequest
.getNbRequested());
303 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
306 public void testAddRequest5() {
307 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
308 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 15, 100, 200);
310 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
311 coalescedRequest
.addRequest(request
);
312 assertEquals("addRequest", 10, coalescedRequest
.getIndex());
313 assertEquals("addRequest", 105, coalescedRequest
.getNbRequested());
314 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
317 public void testAddRequest6() {
318 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
319 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 100, 100, 200);
321 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
322 coalescedRequest
.addRequest(request
);
323 assertEquals("addRequest", 10, coalescedRequest
.getIndex());
324 assertEquals("addRequest", 190, coalescedRequest
.getNbRequested());
325 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
328 public void testAddRequest7() {
329 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
330 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 110, 100, 200);
332 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
333 coalescedRequest
.addRequest(request
);
334 assertEquals("addRequest", 10, coalescedRequest
.getIndex());
335 assertEquals("addRequest", 200, coalescedRequest
.getNbRequested());
336 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
339 public void testAddRequest8() {
340 TmfCoalescedDataRequest
<TmfEvent
> coalescedRequest
= new TmfCoalescedDataRequest
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
341 TmfDataRequest
<TmfEvent
> request
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 111, 100, 200);
343 assertTrue("isCompatible", coalescedRequest
.isCompatible(request
));
344 coalescedRequest
.addRequest(request
);
345 assertEquals("addRequest", 10, coalescedRequest
.getIndex());
346 assertEquals("addRequest", 201, coalescedRequest
.getNbRequested());
347 assertEquals("addRequest", 200, coalescedRequest
.getBlockSize());
350 // ------------------------------------------------------------------------
352 // ------------------------------------------------------------------------
354 public void testDone() {
357 final boolean[] crFlags
= new boolean[4];
358 TmfCoalescedDataRequest
<TmfEvent
> request
= setupTestRequest(crFlags
);
359 TmfDataRequest
<TmfEvent
> subRequest1
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
360 TmfDataRequest
<TmfEvent
> subRequest2
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
361 request
.addRequest(subRequest1
);
362 request
.addRequest(subRequest2
);
366 // Validate the coalescing request
367 assertTrue ("isCompleted", request
.isCompleted());
368 assertFalse("isFailed", request
.isFailed());
369 assertFalse("isCancelled", request
.isCancelled());
371 assertTrue ("handleCompleted", crFlags
[0]);
372 assertTrue ("handleSuccess", crFlags
[1]);
373 assertFalse("handleFailure", crFlags
[2]);
374 assertFalse("handleCancel", crFlags
[3]);
376 // Validate the first coalesced request
377 assertTrue ("isCompleted", subRequest1
.isCompleted());
378 assertFalse("isFailed", subRequest1
.isFailed());
379 assertFalse("isCancelled", subRequest1
.isCancelled());
381 // Validate the second coalesced request
382 assertTrue ("isCompleted", subRequest2
.isCompleted());
383 assertFalse("isFailed", subRequest2
.isFailed());
384 assertFalse("isCancelled", subRequest2
.isCancelled());
387 // ------------------------------------------------------------------------
389 // ------------------------------------------------------------------------
391 public void testFail() {
393 final boolean[] crFlags
= new boolean[4];
394 TmfCoalescedDataRequest
<TmfEvent
> request
= setupTestRequest(crFlags
);
395 TmfDataRequest
<TmfEvent
> subRequest1
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
396 TmfDataRequest
<TmfEvent
> subRequest2
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
397 request
.addRequest(subRequest1
);
398 request
.addRequest(subRequest2
);
402 // Validate the coalescing request
403 assertTrue ("isCompleted", request
.isCompleted());
404 assertTrue ("isFailed", request
.isFailed());
405 assertFalse("isCancelled", request
.isCancelled());
407 assertTrue ("handleCompleted", crFlags
[0]);
408 assertFalse("handleSuccess", crFlags
[1]);
409 assertTrue ("handleFailure", crFlags
[2]);
410 assertFalse("handleCancel", crFlags
[3]);
412 // Validate the first coalesced request
413 assertTrue ("isCompleted", subRequest1
.isCompleted());
414 assertTrue ("isFailed", subRequest1
.isFailed());
415 assertFalse("isCancelled", subRequest1
.isCancelled());
417 // Validate the second coalesced request
418 assertTrue ("isCompleted", subRequest2
.isCompleted());
419 assertTrue ("isFailed", subRequest2
.isFailed());
420 assertFalse("isCancelled", subRequest2
.isCancelled());
423 // ------------------------------------------------------------------------
425 // ------------------------------------------------------------------------
427 public void testCancel() {
429 final boolean[] crFlags
= new boolean[4];
430 TmfCoalescedDataRequest
<TmfEvent
> request
= setupTestRequest(crFlags
);
431 TmfDataRequest
<TmfEvent
> subRequest1
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
432 TmfDataRequest
<TmfEvent
> subRequest2
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
433 request
.addRequest(subRequest1
);
434 request
.addRequest(subRequest2
);
438 // Validate the coalescing request
439 assertTrue ("isCompleted", request
.isCompleted());
440 assertFalse("isFailed", request
.isFailed());
441 assertTrue ("isCancelled", request
.isCancelled());
443 assertTrue ("handleCompleted", crFlags
[0]);
444 assertFalse("handleSuccess", crFlags
[1]);
445 assertFalse("handleFailure", crFlags
[2]);
446 assertTrue ("handleCancel", crFlags
[3]);
448 // Validate the first coalesced request
449 assertTrue ("isCompleted", subRequest1
.isCompleted());
450 assertFalse("isFailed", subRequest1
.isFailed());
451 assertTrue ("isCancelled", subRequest1
.isCancelled());
453 // Validate the second coalesced request
454 assertTrue ("isCompleted", subRequest2
.isCompleted());
455 assertFalse("isFailed", subRequest2
.isFailed());
456 assertTrue ("isCancelled", subRequest2
.isCancelled());
460 // ------------------------------------------------------------------------
461 // cancel sub-requests
462 // ------------------------------------------------------------------------
464 public void testCancelSubRequests() {
466 final boolean[] crFlags
= new boolean[4];
467 TmfCoalescedDataRequest
<TmfEvent
> request
= setupTestRequest(crFlags
);
468 TmfDataRequest
<TmfEvent
> subRequest1
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
469 TmfDataRequest
<TmfEvent
> subRequest2
= new TmfDataRequestStub
<TmfEvent
>(TmfEvent
.class, 10, 100, 200);
470 request
.addRequest(subRequest1
);
471 request
.addRequest(subRequest2
);
473 subRequest1
.cancel();
475 // Validate the first coalesced request
476 assertTrue ("isCompleted", subRequest1
.isCompleted());
477 assertFalse("isFailed", subRequest1
.isFailed());
478 assertTrue ("isCancelled", subRequest1
.isCancelled());
480 // Validate the coalescing request
481 assertFalse("isCompleted", request
.isCompleted());
482 assertFalse("isFailed", request
.isFailed());
483 assertFalse("isCancelled", request
.isCancelled());
485 // Cancel second sub-request
486 subRequest2
.cancel();
488 // Validate the second coalesced request
489 assertTrue ("isCompleted", subRequest2
.isCompleted());
490 assertFalse("isFailed", subRequest2
.isFailed());
491 assertTrue ("isCancelled", subRequest2
.isCancelled());
493 // Validate the coalescing request
494 assertTrue ("isCompleted", request
.isCompleted());
495 assertFalse("isFailed", request
.isFailed());
496 assertTrue ("isCancelled", request
.isCancelled());
498 // Finalize coalescing request -
499 // Note: No need to check "request.isCancelled()" since it was verified above
502 assertTrue ("handleCompleted", crFlags
[0]);
503 assertFalse("handleSuccess", crFlags
[1]);
504 assertFalse("handleFailure", crFlags
[2]);
505 assertTrue ("handleCancel", crFlags
[3]);
508 // ------------------------------------------------------------------------
510 // ------------------------------------------------------------------------