예제 #1
0
파일: Ustring.php 프로젝트: Grummfy/Central
 public function case_get_char_width()
 {
     $this->given($data = [[0x0, 0], [0x19, -1], [0x7f, -1], [0x9f, -1], [0xa0, 1], [0x300, 0], [0x488, 0], [0x600, 0], [0xad, 1], [0x1160, 0], [0x11ff, 0], [0x200b, 0], [0x1100, 2], [0x2160, 1], [0x3f60, 2], [0x303f, 1], [0x2329, 2], [0xaed0, 2], [0x232a, 2], [0xffa4, 1], [0xfe10, 2], [0xfe30, 2], [0xff00, 2], [0xf900, 2]])->when(function () use($data) {
         foreach ($data as $datum) {
             list($code, $width) = $datum;
             $this->when($result = LUT::getCharWidth(LUT::fromCode($code)))->then->integer($result)->isEqualTo($width);
         }
     });
 }