1 a.dunfey 1.25.10.1 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.18 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.16 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.18 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.21 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 a.dunfey 1.25.10.1 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.2 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 kumpf 1.9 //
|
21 mike 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 // Author: Sushma Fernandes (sushma_fernandes@hp.com)
33 //
|
34 kumpf 1.4 // Modified By: Jenny Yu (jenny_yu@hp.com)
|
35 kumpf 1.11 // Carol Ann Krug Graves, Hewlett-Packard Company
36 // (carolann_graves@hp.com)
|
37 a.arora 1.17 // Amit K Arora, IBM (amita@in.ibm.com) for PEP#101
|
38 david.dillard 1.25 // David Dillard, VERITAS Software Corp.
39 // (david.dillard@veritas.com)
|
40 mike 1.2 //
41 //%/////////////////////////////////////////////////////////////////////////////
42
43 #include <fstream>
44 #include <cstring>
45 #include <Pegasus/Common/System.h>
46 #include <Pegasus/Common/Tracer.h>
|
47 a.arora 1.17 #include <Pegasus/Common/AutoPtr.h>
|
48 mike 1.2
49 PEGASUS_USING_STD;
50 PEGASUS_USING_PEGASUS;
51
52 // If Windows platform then set the EOF_CHAR to 2
53 #if defined(PEGASUS_OS_TYPE_WINDOWS)
54 #define EOF_CHAR 2
55 #else
56 #define EOF_CHAR 1
57 #endif
58
59 // Trace files for test purposes
|
60 kumpf 1.11 // Will be created in the $(PEGASUS_TMP) directory, or if not set,
61 // in the current directory
|
62 kumpf 1.15 CString FILE1;
63 CString FILE2;
64 CString FILE3;
65 CString FILE4;
|
66 mike 1.2
67 //
68 // Reads the last trace message from a given trace file and compares the
69 // given string with the string read from file
70 //
71 // return 0 if the strings match
72 // return 1 if the strings do not match
73 //
74 Uint32 compare(const char* fileName, const char* compareStr)
75 {
76 Uint32 count=0;
77 Uint32 retCode=0;
78 fstream file;
|
79 david.dillard 1.23 Uint32 size= static_cast<Uint32>(strlen(compareStr));
|
80 a.arora 1.17 AutoArrayPtr<char> readStr(new char[size+EOF_CHAR+1]);
|
81 mike 1.2
82 file.open(fileName,fstream::in);
83 if (!file.good())
84 {
|
85 a.arora 1.17 return 1;
|
86 mike 1.2 }
|
87 david.dillard 1.22 file.seekg((Sint32) -(static_cast<Sint32>(size)+EOF_CHAR),fstream::end);
|
88 a.arora 1.17 memset(readStr.get(), 0, (size+EOF_CHAR+1)*sizeof(char));
|
89 david.dillard 1.25 file.read(readStr.get(),size+EOF_CHAR);
|
90 a.arora 1.17 (readStr.get())[size]='\0';
91 retCode=strcmp(compareStr,readStr.get());
|
92 mike 1.2 file.close();
93 return retCode;
94 }
95
96 //
97 // Description:
98 // Trace properties file, level and component are not set
99 // Should not log a trace message
100 //
101 // Type:
102 // Negative
103 //
104 // return 0 if the test passed
105 // return 1 if the test failed
106 //
107 Uint32 test1()
108 {
109 const char* METHOD_NAME = "test1";
|
110 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
111 mike 1.2 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL2,"%s %d",
112 "This message should not appear value=",123);
|
113 kumpf 1.10 PEG_METHOD_EXIT();
|
114 mike 1.2 return(compare(FILE1,""));
115 }
116
117 //
118 // Description:
119 // Trace properties level and component are not set
120 // Should not log a trace message
121 //
122 // Type:
123 // Negative
124 //
125 // return 0 if the test passed
126 // return 1 if the test failed
127 //
128 Uint32 test2()
129 {
130 const char* METHOD_NAME = "test2";
131 Tracer::setTraceFile(FILE1);
|
132 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
133 mike 1.2 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL2,"%s %d",
134 "This message should not appear value=",123);
135 return(compare(FILE1,"This message should not appear value=123"));
136 }
137
138 //
139 // Description:
140 // Trace properties component is not set
141 // Should not log a trace message
142 //
143 // Type:
144 // Negative
145 //
146 // return 0 if the test passed
147 // return 1 if the test failed
148 //
149 Uint32 test3()
150 {
151 const char* METHOD_NAME = "test3";
152 Tracer::setTraceLevel(Tracer::LEVEL1);
|
153 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
154 mike 1.2 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL2,"%s",
155 "This message should not appear");
156 return(compare(FILE1,"This message should not appear"));
157 }
158
159 //
160 // Description:
161 // Trace properties file, level and component are set
162 // should log a trace message
163 //
164 // Type:
165 // Positive
166 //
167 // return 0 if the test passed
168 // return 1 if the test failed
169 //
170 Uint32 test4()
171 {
172 const char* METHOD_NAME = "test4";
173 Tracer::setTraceComponents("Config");
|
174 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
175 mike 1.2 return(compare(FILE1,"Entering method test4"));
176 }
177
178 //
179 // Description:
180 // Trace component is set to an invalid component
181 // should not log a trace message
182 //
183 // Type:
184 // Negative
185 //
186 // return 0 if the test passed
187 // return 1 if the test failed
188 //
189 Uint32 test5()
190 {
191 const char* METHOD_NAME = "test5";
192 Tracer::setTraceComponents("Wrong Component Name");
|
193 kumpf 1.10 Tracer::traceExit(__FILE__,__LINE__,TRC_CONFIG,METHOD_NAME);
|
194 mike 1.2 return(compare(FILE1,"Entering method test4"));
195 }
196
197 //
198 // Description:
199 // Trace level is set to LEVEL 2 and logs a LEVEL 4 message
200 // should not log a trace message
201 //
202 // Type:
203 // Negative
204 //
205 // return 0 if the test passed
206 // return 1 if the test failed
207 //
208
209 Uint32 test6()
210 {
211 const char* METHOD_NAME = "test6";
212 Tracer::setTraceComponents("Config");
213 Tracer::setTraceLevel(Tracer::LEVEL2);
214 Tracer::trace(TRC_CONFIG,Tracer::LEVEL2,"%s %s",
215 mike 1.2 "Test Message for Level2 in",METHOD_NAME);
216 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL2,"%s %s",
217 "Test Message for Level2 in",METHOD_NAME);
218 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,"%s",
219 "This Message should not appear");
220 return(compare(FILE1,"Test Message for Level2 in test6"));
221 }
222
223 //
224 // Description:
225 // Trace level is set to an invalid level
226 // should not log a trace message
227 //
228 // Type:
229 // Negative
230 //
231 // return 0 if the test passed
232 // return 1 if the test failed
233 //
234 Uint32 test7()
235 {
236 mike 1.2 const char* METHOD_NAME = "test7";
237 Tracer::setTraceLevel(100);
|
238 kumpf 1.10 Tracer::traceExit(__FILE__,__LINE__,TRC_CONFIG,METHOD_NAME);
|
239 mike 1.2 return(compare(FILE1,"Test Message for Level2 in test6"));
240 }
241
242 //
243 // Description:
244 // Trace level is set to LEVEL1 for a non entry/exit message
245 // should not log a trace message, should log an error
246 //
247 // Type:
248 // Negative
249 //
250 // return 0 if the test passed
251 // return 1 if the test failed
252 //
253 Uint32 test8()
254 {
255 const char* METHOD_NAME = "test8";
256 Tracer::setTraceLevel(Tracer::LEVEL1);
257 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL1,"%s",
258 "Test Message for Level4");
259 return(compare(FILE1,"Test Message for Level2 in test6"));
260 mike 1.2 }
261
262 //
263 // Description:
264 // Changes the trace file to FILE2
265 //
266 // Type:
267 // Positive
268 //
269 // return 0 if the test passed
270 // return 1 if the test failed
271 //
272 Uint32 test9()
273 {
274 const char* METHOD_NAME = "test9";
275 Tracer::setTraceLevel(Tracer::LEVEL3);
276 Tracer::setTraceFile(FILE2);
277
|
278 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
279 mike 1.2 Tracer::trace(TRC_CONFIG,Tracer::LEVEL3,"%s %s",
280 "Test Message for Level3 in",METHOD_NAME);
281 return(compare(FILE2,"Test Message for Level3 in test9"));
282 }
283
284 //
285 // Description:
286 // Passes invalid component in the trace call
287 // should not log a trace message
288 //
289 // Type:
290 // Negative
291 //
292 // return 0 if the test passed
293 // return 1 if the test failed
294 //
295
296 Uint32 test10()
297 {
298 const char* METHOD_NAME = "test10";
299 Tracer::setTraceComponents("ALL");
|
300 kumpf 1.10 Tracer::traceExit(__FILE__,__LINE__,Uint32(-1),METHOD_NAME);
|
301 mike 1.2 return(compare(FILE2,"Test Message for Level3 in test9"));
302 }
303
304 //
305 // Description:
306 // Implements trace call for Tracer::Level1
307 // should log a trace message
308 //
309 // Type:
310 // Positive
311 //
312 // return 0 if the test passed
313 // return 1 if the test failed
314 //
315
316 Uint32 test11()
317 {
318 const char* METHOD_NAME = "test11";
319 Tracer::setTraceComponents("ALL");
320 Tracer::setTraceLevel(Tracer::LEVEL4);
|
321 kumpf 1.10 PEG_METHOD_ENTER(TRC_CONFIG,METHOD_NAME);
|
322 mike 1.2 return(compare(FILE2,"Entering method test11"));
323 }
324
325 //
326 // Description:
327 // Implements trace call for Tracer::Level1
328 // should log a trace message
329 //
330 // Type:
331 // Positive
332 //
333 // return 0 if the test passed
334 // return 1 if the test failed
335 //
336
337 Uint32 test12()
338 {
339 const char* METHOD_NAME = "test12";
340 Tracer::setTraceComponents("ALL");
341 Tracer::setTraceLevel(Tracer::LEVEL4);
|
342 kumpf 1.10 Tracer::traceExit(__FILE__,__LINE__,TRC_CONFIG,METHOD_NAME);
|
343 mike 1.2 return(compare(FILE2,"Exiting method test12"));
344 }
345
346 //
347 // Description:
348 // Implements trace call for Tracer::Level2
349 // should log a trace message
350 //
351 // Type:
352 // Positive
353 //
354 // return 0 if the test passed
355 // return 1 if the test failed
356 //
357
358 Uint32 test13()
359 {
360 const char* METHOD_NAME = "test13";
361 Tracer::setTraceComponents("ALL");
362 Tracer::setTraceLevel(Tracer::LEVEL4);
363 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL2,"%s %s",
364 mike 1.2 "Test Message for Level2 in",METHOD_NAME);
365 return(compare(FILE2,"Test Message for Level2 in test13"));
366 }
367
368 //
369 // Description:
370 // Implements trace call for Tracer::Level3
371 // should log a trace message
372 //
373 // Type:
374 // Positive
375 //
376 // return 0 if the test passed
377 // return 1 if the test failed
378 //
379
380 Uint32 test14()
381 {
382 const char* METHOD_NAME = "test14";
383 Tracer::setTraceComponents("ALL");
384 Tracer::setTraceLevel(Tracer::LEVEL4);
385 mike 1.2 Tracer::setTraceFile(FILE3);
386 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL3,"%s %s",
387 "Test Message for Level3 in",METHOD_NAME);
388 return(compare(FILE3,"Test Message for Level3 in test14"));
389 }
390
391 //
392 // Description:
393 // Implements trace call for Tracer::Level4
394 // should log a trace message
395 //
396 // Type:
397 // Positive
398 //
399 // return 0 if the test passed
400 // return 1 if the test failed
401 //
402
403 Uint32 test15()
404 {
405 const char* METHOD_NAME = "test15";
406 mike 1.2 Tracer::setTraceComponents("ALL");
407 Tracer::setTraceLevel(Tracer::LEVEL4);
408 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,"%s %s",
409 "Test Message for Level4 in",METHOD_NAME);
410 return(compare(FILE3,"Test Message for Level4 in test15"));
411 }
412
413 //
414 // Description:
415 // calls the setTraceComponents with null string
416 // should log a trace message
417 //
418 // Type:
419 // Negative
420 //
421 // return 0 if the test passed
422 // return 1 if the test failed
423 //
424
425 Uint32 test16()
426 {
427 mike 1.2 const char* METHOD_NAME = "test16";
428 Tracer::setTraceComponents("");
429 Tracer::setTraceLevel(Tracer::LEVEL4);
430 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,"%s %s",
431 "This Message should not appear in",METHOD_NAME);
432 return(compare(FILE3,"Test Message for Level4 in test15"));
433 }
434
435 //
436 // Description:
437 // calls the setTraceComponents with one valid and another invalid component
438 // should log a trace message
439 //
440 // Type:
441 // Negative
442 //
443 // return 0 if the test passed
444 // return 1 if the test failed
445 //
446
447 Uint32 test17()
448 mike 1.2 {
449 const char* METHOD_NAME = "test17";
|
450 kumpf 1.3 Tracer::setTraceComponents("InvalidComp");
|
451 mike 1.2 Tracer::setTraceLevel(Tracer::LEVEL4);
452 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,"%s %s",
453 "This Message should not appear in",METHOD_NAME);
454 return(compare(FILE3,"Test Message for Level4 in test15"));
455 }
|
456 kumpf 1.3 //
457 // Description:
458 // calls the _traceBuffer call
459 // should log a trace message
460 //
461 // Type:
462 // Positive
463 //
464 // return 0 if the test passed
465 // return 1 if the test failed
466 //
467
468 Uint32 test18()
469 {
470 const char* METHOD_NAME = "test18";
471 Tracer::setTraceComponents("Config,InvalidComp");
472 Tracer::setTraceLevel(Tracer::LEVEL4);
473 Tracer::traceBuffer(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,
474 "This Message should appear in",4);
475 Tracer::traceBuffer(TRC_CONFIG,Tracer::LEVEL4,
476 "This Message should appear in",4);
477 kumpf 1.3 return(compare(FILE3,"This"));
478 }
479
480 //
481 // Description:
482 // calls the isValid call
483 // should not log a trace message
484 //
485 // Type:
486 // Positive
487 //
488 // return 0 if the test passed
489 // return 1 if the test failed
490 //
491
492 Uint32 test19()
493 {
|
494 kumpf 1.4 const char* METHOD_NAME = "test18";
495 Tracer::setTraceComponents("Config,InvalidComp");
|
496 kumpf 1.3 Tracer::setTraceLevel(Tracer::LEVEL4);
|
497 kumpf 1.4 Tracer::traceBuffer(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,
498 "This Message should appear in",4);
499 Tracer::traceBuffer(TRC_CONFIG,Tracer::LEVEL4,
500 "This Message should appear in",4);
|
501 kumpf 1.3 return(compare(FILE3,"This"));
502 }
|
503 mike 1.2
|
504 kumpf 1.4 //
505 // Description:
506 // Trace a string.
507 // Calls the _traceString() method
508 // should log a trace message
509 //
510 // Type:
511 // Positive
512 //
513 // return 0 if the test passed
514 // return 1 if the test failed
515 //
516
517 Uint32 test20()
518 {
519 const char* METHOD_NAME = "test20";
520 Tracer::setTraceFile(FILE4);
521 Tracer::setTraceComponents("ALL");
522 Tracer::setTraceLevel(Tracer::LEVEL4);
523
524 PEG_METHOD_ENTER(TRC_CONFIG, METHOD_NAME);
525 kumpf 1.4 Tracer::trace(__FILE__,__LINE__,TRC_CONFIG,Tracer::LEVEL4,
526 "Test Message for Level4 in test20");
527 return(compare(FILE4,"Test Message for Level4 in test20"));
528 }
529
530 //
531 // Description:
532 // Trace a CIMException.
533 // Calls the traceCIMException() method
534 // should log a trace message
535 //
536 // Type:
537 // Positive
538 //
539 // return 0 if the test passed
540 // return 1 if the test failed
541 //
542
543 Uint32 test21()
544 {
545 const char* METHOD_NAME = "test21";
546 kumpf 1.4 Tracer::setTraceFile(FILE4);
547 Tracer::setTraceComponents("ALL");
548 Tracer::setTraceLevel(Tracer::LEVEL4);
549
550 PEG_METHOD_ENTER(TRC_CONFIG, METHOD_NAME);
551
552 // test tracing CIMException
553 try
554 {
555 throw PEGASUS_CIM_EXCEPTION(
556 CIM_ERR_NOT_SUPPORTED,
557 "CIM Exception Message for Level4 in test21.");
558 }
|
559 kumpf 1.12 catch (CIMException& e)
|
560 kumpf 1.4 {
561 Tracer::traceCIMException(TRC_CONFIG,Tracer::LEVEL4, e);
562 }
563
564 return 0;
565 }
566
567 //
568 // Description:
569 // Trace a string using macro.
570 // should log a trace message
571 //
572 // Type:
573 // Positive
574 //
575 // return 0 if the test passed
576 // return 1 if the test failed
577 //
578 Uint32 test22()
579 {
580 const char* METHOD_NAME = "test22";
581 kumpf 1.4 Tracer::setTraceFile(FILE4);
582 Tracer::setTraceComponents("ALL");
583 Tracer::setTraceLevel(Tracer::LEVEL4);
584
585 PEG_METHOD_ENTER(TRC_CONFIG, METHOD_NAME);
586
587 PEG_TRACE_STRING(TRC_CONFIG,Tracer::LEVEL4,"Test message for Level4 in test22.");
588
589 return(compare(FILE4,"Test message for Level4 in test22."));
590 }
591
|
592 karl 1.7 int main(int argc, char** argv)
|
593 mike 1.2 {
594
595 // Execute the tests only if trace calls are included
596
597 #ifdef PEGASUS_REMOVE_TRACE
|
598 karl 1.7 cout << argv[0] << " +++++ passed all tests" << endl;
|
599 mike 1.2 return 0;
600 #else
|
601 kumpf 1.11
602 const char* tmpDir = getenv ("PEGASUS_TMP");
603 if (tmpDir == NULL)
604 {
605 tmpDir = ".";
606 }
607 String f1 (tmpDir);
|
608 kumpf 1.13 f1.append("/testtracer1.trace");
|
609 kumpf 1.14 FILE1 = f1.getCString();
|
610 kumpf 1.11 String f2 (tmpDir);
|
611 kumpf 1.13 f2.append("/testtracer2.trace");
|
612 kumpf 1.14 FILE2 = f2.getCString();
|
613 kumpf 1.11 String f3 (tmpDir);
|
614 kumpf 1.13 f3.append("/testtracer3.trace");
|
615 kumpf 1.14 FILE3 = f3.getCString();
|
616 kumpf 1.11 String f4 (tmpDir);
|
617 kumpf 1.13 f4.append("/testtracer4.trace");
|
618 kumpf 1.14 FILE4 = f4.getCString();
|
619 kumpf 1.11
|
620 mike 1.2 System::removeFile(FILE1);
621 System::removeFile(FILE2);
622 System::removeFile(FILE3);
|
623 kumpf 1.4 System::removeFile(FILE4);
|
624 mike 1.2 if (test1() == 0)
625 {
626 cout << "Tracer test (test1) failed" << endl;
627 exit(1);
628 }
629 if (test2() == 0)
630 {
631 cout << "Tracer test (test2) failed" << endl;
632 exit(1);
633 }
634 if (test3() == 0)
635 {
636 cout << "Tracer test (test3) failed" << endl;
637 exit(1);
638 }
639 if (test4() != 0)
640 {
641 cout << "Tracer test (test4) failed" << endl;
642 exit(1);
643 }
644 if (test5() != 0)
645 mike 1.2 {
646 cout << "Tracer test (test5) failed" << endl;
647 exit(1);
648 }
649 if (test6() != 0)
650 {
651 cout << "Tracer test (test6) failed" << endl;
652 exit(1);
653 }
654 if (test7() != 0)
655 {
656 cout << "Tracer test (test7) failed" << endl;
657 exit(1);
658 }
659 if (test8() != 0)
660 {
661 cout << "Tracer test (test8) failed" << endl;
662 exit(1);
663 }
664 if (test9() != 0)
665 {
666 mike 1.2 cout << "Tracer test (test9) failed" << endl;
667 exit(1);
668 }
669 if (test10() != 0)
670 {
671 cout << "Tracer test (test10) failed" << endl;
672 exit(1);
673 }
674 if (test11() != 0)
675 {
676 cout << "Tracer test (test11) failed" << endl;
677 exit(1);
678 }
679 if (test12() != 0)
680 {
681 cout << "Tracer test (test12) failed" << endl;
682 exit(1);
683 }
684 if (test13() != 0)
685 {
686 cout << "Tracer test (test13) failed" << endl;
687 mike 1.2 exit(1);
688 }
689 if (test14() != 0)
690 {
691 cout << "Tracer test (test14) failed" << endl;
692 exit(1);
693 }
694 if (test15() != 0)
695 {
696 cout << "Tracer test (test15) failed" << endl;
697 exit(1);
698 }
699 if (test16() != 0)
700 {
701 cout << "Tracer test (test16) failed" << endl;
|
702 kumpf 1.3 exit(1);
703 }
704 if (test17() != 0)
705 {
706 cout << "Tracer test (test17) failed" << endl;
707 exit(1);
708 }
709 if (test18() != 0)
710 {
711 cout << "Tracer test (test18) failed" << endl;
712 exit(1);
713 }
714 if (test19() != 0)
715 {
716 cout << "Tracer test (test19) failed" << endl;
|
717 mike 1.2 exit(1);
718 }
|
719 kumpf 1.4 if (test20() != 0)
720 {
721 cout << "Tracer test (test20) failed" << endl;
722 exit(1);
723 }
724 if (test21() != 0)
725 {
726 cout << "Tracer test (test21) failed" << endl;
727 exit(1);
728 }
729 if (test22() != 0)
730 {
731 cout << "Tracer test (test22) failed" << endl;
732 exit(1);
733 }
|
734 karl 1.7 cout << argv[0] << " +++++ passed all tests" << endl;
|
735 mike 1.2 System::removeFile(FILE1);
736 System::removeFile(FILE2);
737 System::removeFile(FILE3);
|
738 kumpf 1.4 System::removeFile(FILE4);
|
739 mike 1.2 return 0;
740 #endif
741 }
742
|