00001
00002
00003 #include <iostream>
00004 #include <sstream>
00005 #include <complex>
00006 #include "TestSuite.hh"
00007 #include "SuiteTest.hh"
00008
00009 int debug_level = 10;
00010 int version_flag;
00011
00012 int
00013 main()
00014 {
00015 ccunit::TestSuite *s = new ccunit::TestSuite("Suite Test");
00016
00017
00018 s->Add(ccunit::TestComponentPtr(new ComplexTest));
00019 s->Add(ccunit::TestComponentPtr(new VoidTest));
00020
00021
00022 cout << *s << endl;
00023
00024 cout << "fails == " << s->getNumFailed() << " (should be 1)\n\n";
00025
00026
00027 ccunit::TestSuite s2(s->getName());
00028 ostringstream os;
00029
00030 s2.Add(ccunit::TestComponentPtr(s));
00031
00032
00033 os << s2;
00034
00035 cout << "Total Passes: " << s2.getNumPassed()
00036 << " (should be 3)\n";
00037 cout << "Total failures: " << s2.getNumFailed() << " (should be 1)\n";
00038 cout << os.str();
00039 cout << endl;
00040 }
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067