(file) Return to Tracer.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common / tests / Tracer

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2