[wadalabfont-kit] / jis2prim / AssumptionTest.cc  

View of /jis2prim/AssumptionTest.cc

Parent Directory | Revision Log
Revision: 1.1 - (download) (as text) (annotate)
Tue Aug 20 11:10:36 2002 UTC (22 years, 3 months ago) by ktanaka
Branch: MAIN
CVS Tags: SNAP-20040518, SNAP-20030702, SNAP-20030630, SNAP-20030624, HEAD
*** empty log message ***
#include <strstream>
#include "AssumptionTest.h"

void AssumptionTest::setUp(){
  a1=new Assumption();
  a1->add(AndAssumption().add(SimpleAssumption((PtypeMask)(YokoMask|TenMask),JointStart,0,0,90,0)));
}
void AssumptionTest::tearDown(){
  delete a1;
}
static const char* showImage=
"SimpleAssumption(pmask=3,jtype=1,x=0,y=0,angle=90,hint=0)";

void AssumptionTest::testShow(){
  std::ostrstream os;
  os << *a1;
  os.freeze();
  CPPUNIT_ASSERT( os.pcount() == strlen(showImage));
  CPPUNIT_ASSERT( !strncmp(os.str(),showImage,sizeof(showImage)));
}

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help