proj home

Files   Classes   Functions   Hierarchy  

simplexD1tessindexedtest Class Reference

Test simplexD1tessindexed. More...

#include <simplexD1tessindexedtest.h>

Collaboration diagram for simplexD1tessindexedtest:

List of all members.

Public Member Functions

void test01 ()
 From vectors construct a simplexD1tessindexed tess and print it.
void test02 ()
 Print screen test simplexD1indexed serialization.
intc unittest01 ()
 Unit test simplexD1indexed serialization.

Static Public Attributes

static string doc []
 Brief description of each test.


Detailed Description

Test simplexD1tessindexed.

Definition at line 7 of file simplexD1tessindexedtest.h.


Member Function Documentation

void simplexD1tessindexedtest::test01 (  ) 

From vectors construct a simplexD1tessindexed tess and print it.

Definition at line 21 of file simplexD1tessindexedtest.cpp.

References simplexD1tessindexed< PT, PD, INDX >::construct().

00022 {
00023   double pt1[] = 
00024   {
00025     0.0, 0.0,
00026     0.0, 0.0,
00027     1.0, 0.0,
00028     0.0, 1.0,
00029     1.0, 1.0,
00030     0.5, 1.7
00031   };
00032 
00033   uint vi1[] =
00034   {
00035     0, 0,
00036     4, 3,
00037     5, 4,
00038     5, 1,
00039     1, 2,
00040     2, 5,
00041     1, 3,
00042     5, 3
00043   };
00044 
00045   simplexD1tessindexed<point2<double>,double,uint> tess;
00046 
00047   tess.construct(pt1,6,vi1,8);
00048 
00049   string s = (string)tess;
00050 
00051   cout << "***" << endl;
00052   cout << s;
00053   cout << "***" << endl;
00054 }

void simplexD1tessindexedtest::test02 (  ) 

Print screen test simplexD1indexed serialization.

Definition at line 56 of file simplexD1tessindexedtest.cpp.

References tokenizermisc::readfile(), simplexD1tessindexed< PT, PD, INDX >::serializeInverse(), and SHOW.

00057 {
00058   string file="tessD1001.txt";
00059 
00060   cout << "Read file "+file+" to a string." << endl;
00061 
00062   string s;
00063   bool res = tokenizermisc::readfile(s,file);
00064   cout << SHOW(res) << endl;
00065 
00066   cout << s << endl;
00067 
00068   simplexD1tessindexed<point2<double>,double,uint> tess;
00069 
00070   cout << "Check to see what was read in" << endl;
00071 
00072   tess.serializeInverse(s);
00073 
00074   cout << (string)tess << endl;
00075 }

intc simplexD1tessindexedtest::unittest01 (  ) 

Unit test simplexD1indexed serialization.

Definition at line 77 of file simplexD1tessindexedtest.cpp.

References assertreturnOS, tokenizermisc::readfile(), and simplexD1tessindexed< PT, PD, INDX >::serializeInverse().

00078 {
00079   string file="tessD1001.txt";
00080   string file2="tessD1001tmp.txt";
00081   string s1;
00082   assertreturnOS( tokenizermisc::readfile(s1,file) );
00083 
00084   simplexD1tessindexed<point2<double>,double,uint> tess1;
00085   tess1.serializeInverse(s1);
00086 
00087   ofstream xx(file2.c_str());
00088   xx << (string)tess1 << endl;
00089   xx.close();
00090 
00091   string s2;
00092   assertreturnOS( tokenizermisc::readfile(s2,file2) );
00093   simplexD1tessindexed<point2<double>,double,uint> tess2;
00094   tess2.serializeInverse(s2);
00095 
00096   assertreturnOS( tess1 == tess2 );
00097 
00098   return 0;
00099 }


Member Data Documentation

Initial value:

 
{
  "",
  "From vectors construct a simplexD1tessindexed tess and print it.",
  "Print screen test simplexD1indexed serialization.",
  "Unit test simplexD1indexed serialization."
}
Brief description of each test.

Definition at line 12 of file simplexD1tessindexedtest.h.

Referenced by main().


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

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