[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.2, Tue Mar 19 00:33:14 2002 UTC
Line 14 
Line 14 
  private:   private:
   BitmapFont *a;    BitmapFont *a;
   Matchers *mat;    Matchers *mat;
     BitmapFontFile *ff;
  public:   public:
   void setUp(){    void setUp(){
     /*      /*
Line 45 
Line 46 
   
     a=new BitmapFont(24,24,"000006FFFFFF00C30000C30000C30000C30020C30C3FFFFE30C30C30C30C30C30C30C30C30C30C30C30C3FFFFC30C30C00C30000C30000C30000C30000C30000C306FFFFFF000000");      a=new BitmapFont(24,24,"000006FFFFFF00C30000C30000C30000C30020C30C3FFFFE30C30C30C30C30C30C30C30C30C30C30C30C3FFFFC30C30C00C30000C30000C30000C30000C30000C306FFFFFF000000");
     mat=new Matchers();      mat=new Matchers();
       ff=new BitmapFontFile("jiskan24.bdf");
   }    }
   void tearDown(){    void tearDown(){
     delete a; delete mat;      delete a; delete mat;
       delete ff;
   }    }
   void testShow(){    void testShow(){
     cout << *mat << '\n';      cout << *mat << '\n';
Line 58 
Line 61 
     for(it=mr.begin();it!=mr.end();it++)      for(it=mr.begin();it!=mr.end();it++)
       cout << *it << '\n';        cout << *it << '\n';
   }    }
     void testCover(){
       for(int code=0x3021;code<=0x307e;code++){
         BitmapFont bf=ff->find(code);
         vector<pixel> nc=mat->notCovered(bf);
         if(!nc.empty()){
           cout << "---------------------------------------\n";
           cout << bf;
           cout << BitmapFont(bf.getWidth(),bf.getHeight(),nc) ;
         }
       }
     }
   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;
   }    }
 };  };


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

ktanaka

Powered by ViewCVS 1.0-dev

ViewCVS and CVS Help