[wadalabfont-kit] / jis2prim / MatchersTest.h  

Diff of /jis2prim/MatchersTest.h

Parent Directory | Revision Log

version 1.1, Fri Feb 22 12:03:48 2002 UTC version 1.4, Tue Aug 20 11:10:37 2002 UTC
Line 1 
Line 1 
   
 #ifndef _MATCHERS_TEST_TEST_H  #ifndef _MATCHERS_TEST_TEST_H
 #define _MATCHERS_TEST_TEST_H  #define _MATCHERS_TEST_TEST_H
 #include <cppunit/TestCase.h>  #include <cppunit/TestCase.h>
Line 6 
Line 5 
 #include <cppunit/TestSuite.h>  #include <cppunit/TestSuite.h>
 #include <cppunit/TestResult.h>  #include <cppunit/TestResult.h>
 #include <cppunit/TextTestRunner.h>  #include <cppunit/TextTestRunner.h>
   #include <cppunit/extensions/HelperMacros.h>
 #include "Matchers.h"  #include "Matchers.h"
   #include <vector>
   #include <iostream>
   
 using namespace CppUnit;  class MatchersTest : public CppUnit::TestFixture {
     CPPUNIT_TEST_SUITE( MatchersTest );
 class MatchersTest : public TestCase {    CPPUNIT_TEST( testShow );
     CPPUNIT_TEST( testMatch );
     CPPUNIT_TEST( testCover );
     CPPUNIT_TEST_SUITE_END();
  private:   private:
   BitmapFont *a;    BitmapFont *a;
   Matchers *mat;    Matchers *mat;
     BitmapFontFile *ff;
  public:   public:
   void setUp(){    void setUp();
     /*    void tearDown();
 .....................@@.    void testShow();
 @@@@@@@@@@@@@@@@@@@@@@@@    void testMatch();
 ........@@....@@........    void testCover();
 ........@@....@@........  #if 0
 ........@@....@@........  
 ........@@....@@........  
 ..@.....@@....@@....@@..  
 ..@@@@@@@@@@@@@@@@@@@@@.  
 ..@@....@@....@@....@@..  
 ..@@....@@....@@....@@..  
 ..@@....@@....@@....@@..  
 ..@@....@@....@@....@@..  
 ..@@....@@....@@....@@..  
 ..@@....@@....@@....@@..  
 ..@@@@@@@@@@@@@@@@@@@@..  
 ..@@....@@....@@....@@..  
 ........@@....@@........  
 ........@@....@@........  
 ........@@....@@........  
 ........@@....@@........  
 ........@@....@@........  
 ........@@....@@.....@@.  
 @@@@@@@@@@@@@@@@@@@@@@@@  
 ........................  
     */  
   
     a=new BitmapFont(24,24,"000006FFFFFF00C30000C30000C30000C30020C30C3FFFFE30C30C30C30C30C30C30C30C30C30C30C30C3FFFFC30C30C00C30000C30000C30000C30000C30000C306FFFFFF000000");  
     mat=new Matchers();  
   }  
   void tearDown(){  
     delete a; delete mat;  
   }  
   void testShow(){  
     cout << *mat << '\n';  
   }  
   void testMatch(){  
     vector<MatchResult> mr=mat->findMatch(*a);  
     vector<MatchResult>::iterator it;  
     for(it=mr.begin();it!=mr.end();it++)  
       cout << *it << '\n';  
   }  
   static Test *suite(){    static Test *suite(){
     TestSuite *suiteOfTests = new TestSuite;      TestSuite *suiteOfTests = new TestSuite;
     suiteOfTests->addTest (new TestCaller<MatchersTest>("testShow", &MatchersTest::testShow));      suiteOfTests->addTest (new TestCaller<MatchersTest>("testShow", &MatchersTest::testShow));
     suiteOfTests->addTest (new TestCaller<MatchersTest>("testMatch", &MatchersTest::testMatch));      suiteOfTests->addTest (new TestCaller<MatchersTest>("testMatch", &MatchersTest::testMatch));
       suiteOfTests->addTest (new TestCaller<MatchersTest>("testCover", &MatchersTest::testCover));
     return suiteOfTests;      return suiteOfTests;
   }    }
   #endif
 };  };
   
 #endif /*  _MATCHERS_TEST_TEST_H */  #endif /*  _MATCHERS_TEST_TEST_H */


Generate output suitable for use with a patch program
Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help