unicode

Branch: main

Switch branches or tags

Branch: main
Go to file t

413 files indexed

History
Code

segmentation/grapheme_wbtest.mbt
1///|2test "code points below SimpleLimit only take part in the control rules" {3  // The fast path in `next_grapheme_boundary` relies on this; it must be4  // revisited if a Unicode update changes the properties of these code5  // points.6  for code_point in 0..<SimpleLimit {7    let value = grapheme_break_value(code_point)8    guard (value & GcbMask) is (0 | GcbCR | GcbLF | GcbControl) &&9      ((value >> InCBShift) & InCBMask) == 0 else {10      fail("U+\{code_point.to_string(radix=16)} has packed value \{value}")11    }12  }13}14