proj home

Files   Classes   Functions   Hierarchy  

makestatetest Class Reference

Test makestate class. More...

#include <makestatetest.h>

Collaboration diagram for makestatetest:

List of all members.

Static Public Member Functions

static void test01 ()
 Test standardbuild and print.
static void test02 ()
 Test eval(compilationfile&).
static void test03 ()
 Construct and add main.cpp onto process queue.
static void test04 (int argc, char **argv)
 Step though makestate evaluation $ .
static void test05 (int argc, char **argv)
 Print a header/cpp/obj file after evaluation.
static void test06 (int argc, char **argv)
 Dependencies calculated, Pass1 and Pass2 printed.

Static Public Attributes

static string doc []
 Brief description of each test.


Detailed Description

Test makestate class.

Definition at line 10 of file makestatetest.h.


Member Function Documentation

void makestatetest::test01 (  )  [static]

Test standardbuild and print.

Definition at line 22 of file makestatetest.cpp.

References makestate< CFC >::print(), makestate< CFC >::printstandard, makestate< CFC >::standard, and makestate< CFC >::standardbuild().

Referenced by main().

00023 {
00024   makestate<cfcontainervec> ms;
00025   ms.standardbuild();
00026   ms.printstandard=true;
00027   ms.print();
00028   cout << endl;
00029   cout << "Is iostream contained?" << endl;
00030   if ( ms.standard["iostream"] )
00031     cout << "yes" << endl; 
00032   else
00033     cout << "no" << endl;
00034 }

void makestatetest::test02 (  )  [static]

Test eval(compilationfile&).

Definition at line 36 of file makestatetest.cpp.

References makestate< CFC >::eval(), makestate< CFC >::print(), makestate< CFC >::proj, and makestate< CFC >::standardbuild().

Referenced by main().

00037 {
00038 
00039   makestate<cfcontainervec> ms;
00040   ms.standardbuild();
00041 
00042   ms.proj.construct();
00043 
00044   string s1="../vrml/vrmlshapeparse.h";
00045   compilationfile cf(s1);
00046 
00047   ms.eval(cf);
00048 
00049   ms.print();
00050 }

void makestatetest::test03 (  )  [static]

Construct and add main.cpp onto process queue.

Definition at line 52 of file makestatetest.cpp.

References makestate< CFC >::print(), makestate< CFC >::processqueueadd(), makestate< CFC >::proj, and makestate< CFC >::standardbuild().

Referenced by main().

00053 {
00054   makestate<cfcontainervec> ms;
00055   ms.standardbuild();
00056 
00057   ms.proj.construct();
00058 
00059   compilationfile* x = ms.proj.files["main.cpp"];
00060   ms.processqueueadd(x);
00061 
00062   ms.print();
00063 }

void makestatetest::test04 ( int  argc,
char **  argv 
) [static]

Step though makestate evaluation $ .

./makefilebuildtool/main prog=34 n=5

Definition at line 65 of file makestatetest.cpp.

References commandline::mapvar(), makestate< CFC >::print(), makestate< CFC >::printobjs, makestate< CFC >::printprocessed, makestate< CFC >::printprocessqueue, and makestate< CFC >::printunknown.

Referenced by main().

00066 {
00067   commandline cmd(argc,argv);
00068   uint imax=3; 
00069   cmd.mapvar(imax,"n");
00070 
00071   makestate<cfcontainervec> ms;
00072   processqueuebuild<cfcontainervec> pq(ms);
00073   ms.printunknown=false;
00074   ms.printobjs=false;
00075 
00076   uint i=0;
00077   for ( ; (i<imax)&&(!pq); ++pq, ++i )
00078     ms.print();
00079 
00080   ms.print();
00081 
00082   cout << endl;
00083   ms.printprocessqueue=false;
00084   ms.printprocessed=false;
00085   ms.printunknown=true;
00086   ms.printobjs=true;
00087   ms.print();
00088 
00089 }

void makestatetest::test05 ( int  argc,
char **  argv 
) [static]

Print a header/cpp/obj file after evaluation.

$ ../makefilebuildtool/main prog=35 <file=vrmltest.o>

Definition at line 91 of file makestatetest.cpp.

References commandline::mapvar(), makestate< CFC >::objs, compilationfile::print(), makestate< CFC >::print(), and makestate< CFC >::proj.

Referenced by main().

00092 {
00093   commandline cmd(argc,argv);
00094   string file="main.cpp";
00095   cmd.mapvar(file,"file");
00096 
00097   makestate<cfcontainervec> ms;
00098   processqueuebuild<cfcontainervec> pq(ms);
00099   //ms.printunknown=false;
00100   //ms.printobjs=false;
00101 
00102   for ( ; !pq; ++pq );
00103 
00104   ms.print();
00105 
00106   compilationfile* x = ms.proj.files[file];
00107   if (!x)
00108     x = ms.objs[file];
00109   if (!x)
00110   {
00111     cout << "error:  file "+file << " not found." << endl;
00112     return;
00113   }
00114   x->print();
00115 }

void makestatetest::test06 ( int  argc,
char **  argv 
) [static]

Dependencies calculated, Pass1 and Pass2 printed.

$ ../makefilebuildtool/main prog=36 <driver=main2>

Definition at line 117 of file makestatetest.cpp.

References makestate< CFC >::driver, commandline::mapvar(), makestate< CFC >::objsdependenciesPass1(), makestate< CFC >::objsdependenciesPass2(), makestate< CFC >::print(), makestate< CFC >::printobjs, makestate< CFC >::printobjsdependencies, makestate< CFC >::printprocessed, makestate< CFC >::printprocessqueue, and makestate< CFC >::printunknown.

Referenced by main().

00118 {
00119   commandline cmd(argc,argv);
00120 
00121   makestate<cfcontainervec> ms;
00122   cmd.mapvar(ms.driver,"driver");
00123 
00124   processqueuebuild<cfcontainervec> pq(ms);
00125   for ( ; !pq; ++pq );
00126 
00127   ms.print();
00128   
00129   //cout << "Trying now" << endl;
00130 
00131 /*
00132   ms.objs.reset();
00133   if (!ms.objs)
00134     ms.objseval(*ms.objs());
00135 */
00136   cout << "Turning on/off printing stuff" << endl << endl;
00137   ms.printobjsdependencies=true; 
00138   ms.printprocessqueue=false;
00139   ms.printunknown=false;
00140   ms.printprocessed=false;
00141   ms.printobjs=false;
00142 
00143   cout << "Pass1" << endl;
00144   ms.objsdependenciesPass1();
00145 
00146   ms.print();
00147 
00148   cout << "Pass2" << endl;
00149   ms.objsdependenciesPass2();
00150   ms.print();
00151 }


Member Data Documentation

string makestatetest::doc [static]

Initial value:

 
{
  "",
  "Test standardbuild and print.",
  "Test eval(compilationfile&).",
  "Construct and add main.cpp onto process queue.",
  "$ ../makefilebuildtool/main prog=34 n=5   Step though makestate evaluation",
  "$ ../makefilebuildtool/main prog=35 <file=vrmltest.o>   Print a header/cpp/obj file after evaluation.", 
  "$ ../makefilebuildtool/main prog=36 <driver=main2>   Dependencies calculated, Pass1 and Pass2 printed. "
}
Brief description of each test.

Definition at line 15 of file makestatetest.h.

Referenced by main().


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:04 2011 for Chelton Evans Source by  doxygen 1.5.8