Files Classes Functions Hierarchy
#include <mkerrorstest.h>
Static Public Member Functions | |
| static int | test01 (int argc, char **argv) |
| Compile : mkerrors. | |
| static int | test02 (int argc, char **argv) |
| Unit test : projunittest. | |
| static int | test03 (int argc, char **argv) |
| Unit tests : projunittests. | |
| static int | test04 (int argc, char **argv) |
| Basic html module status page test. | |
| static int | test05 (int argc, char **argv) |
| Full html module status page. | |
| static int | unittest01 (int argc, char **argv) |
| Unit test : mkerrorsconfig. | |
| static int | test06 (int argc, char **argv) |
| Complie : mkerrors with config. | |
Static Public Attributes | |
| static string | doc [] |
| Brief description of each test. | |
TODO - consider renaming test01 test02 test03 as their importance had gone from the test build to the actual application. i.e app01 app02 app03 where app is short for application
Definition at line 15 of file mkerrorstest.h.
| int mkerrorstest::test01 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Compile : mkerrors.
Definition at line 23 of file mkerrorstest.cpp.
Referenced by main().
00026 { 00027 return mkerrorscompile().eval(argc,argv); 00028 }
| int mkerrorstest::test02 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Unit test : projunittest.
Definition at line 39 of file mkerrorstest.cpp.
References commandline::args, projunittest::eval(), commandline::hastoken(), projprint::setsilent(), projprint::setsummary(), and projunittest::terminal.
Referenced by main().
00042 { 00043 commandline cmd(argc,argv); 00044 00045 string filename=cmd.args[1]; 00046 00047 projunittest unit(filename); 00048 if (cmd.hastoken("silent")) 00049 unit.terminal.setsilent(); 00050 if (cmd.hastoken("summary")) 00051 unit.terminal.setsummary(); 00052 00053 return unit.eval(); 00054 }
| int mkerrorstest::test03 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Unit tests : projunittests.
Definition at line 57 of file mkerrorstest.cpp.
References projunittests::eval(), commandline::hastoken(), projprint::setsilent(), projprint::setsummary(), and projunittests::terminal.
Referenced by main().
00060 { 00061 commandline cmd(argc,argv); 00062 00063 projunittests units; 00064 if (cmd.hastoken("silent")) 00065 units.terminal.setsilent(); 00066 if (cmd.hastoken("summary")) 00067 units.terminal.setsummary(); 00068 00069 return units.eval(); 00070 }
| int mkerrorstest::test04 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Basic html module status page test.
Definition at line 74 of file mkerrorstest.cpp.
References modulereport::update01().
Referenced by main().
00077 { 00078 // commandline cmd(argc,argv); 00079 00080 modulereport mrep; 00081 mrep.update01(); 00082 00083 return 0; 00084 }
| int mkerrorstest::test05 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Full html module status page.
Definition at line 87 of file mkerrorstest.cpp.
References modulereport::update().
Referenced by main().
00090 { 00091 modulereport mrep; 00092 mrep.update(); 00093 00094 return 0; 00095 }
| int mkerrorstest::test06 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Complie : mkerrors with config.
Definition at line 31 of file mkerrorstest.cpp.
Referenced by main().
00034 { 00035 return mkerrorscompile().eval2(argc,argv); 00036 }
| int mkerrorstest::unittest01 | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Unit test : mkerrorsconfig.
Definition at line 99 of file mkerrorstest.cpp.
References assertreturnOS, mkerrorsconfig::find(), mkerrorsconfig::globalconfigfile, mkerrorsconfig::globalconfigfile_exists, mkerrorsconfig::read(), SHOW3, and mkerrorsconfig::vi.
Referenced by main().
00102 { 00103 cout << "Testing reading config" << endl; 00104 00105 mkerrorsconfig mkc; 00106 00107 cout << SHOW3(mkerrorsconfig::globalconfigfile) << endl; 00108 cout << SHOW3(mkc.globalconfigfile_exists) << endl; 00109 cout << SHOW3(mkc.vi.size()) << endl; 00110 00111 cout << "Reading global configuration file: " << SHOW3(mkerrorsconfig::globalconfigfile) << endl; 00112 mkc.read(); 00113 00114 cout << "Printing list" << endl; 00115 00116 cout << SHOW3(mkc.vi.size()) << endl; 00117 for (uint i=0; i<mkc.vi.size(); ++i) 00118 { 00119 cout << mkc.vi[i].xml() << endl; 00120 } 00121 00122 cout << SHOW3(mkc.globalconfigfile_exists) << endl; 00123 00124 cout << "Try a find: debug, release, gproj and gdb" << endl; 00125 mkerrorscompiletag ct; 00126 assertreturnOS(mkc.find(ct,"debug")); 00127 assertreturnOS(mkc.find(ct,"release")); 00128 assertreturnOS(mkc.find(ct,"gprof")); 00129 assertreturnOS(mkc.find(ct,"gdb")); 00130 00131 return 0; 00132 }
string mkerrorstest::doc [static] |
Initial value:
{
"Compile : mkerrors",
"Unit test : projunittest",
"Unit tests : projunittests",
"Basic html module status page test.",
"Full html module status page.",
"Unit test : mkerrorsconfig",
"Complie : mkerrors with config",
""
}
Definition at line 20 of file mkerrorstest.h.
Referenced by main().
1.5.8