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