Пример #1
0
 public void CinfoBase_OnTestCinfo_ReturnsExpectedIndex()
 {
     using (var seg = new PaduakDisposableTestSegment("hello world"))
     {
         IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg);
         IntPtr char_info = Graphite2Api.SegCinfo(seg.Seg, (uint)Graphite2Api.SlotBefore(firstSlot));
         Assert.AreEqual(0, Graphite2Api.CinfoBase(char_info));
     }
 }
Пример #2
0
 public void SegCinfo_OnATestSegAndSlot_ReturnsNonNullCharInfoPtr()
 {
     using (var seg = new PaduakDisposableTestSegment("hello world"))
     {
         IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg);
         IntPtr char_info = Graphite2Api.SegCinfo(seg.Seg, (uint)Graphite2Api.SlotBefore(firstSlot));
         Assert.AreNotEqual(IntPtr.Zero, char_info);
     }
 }
Пример #3
0
 public void CinfoBreakWeight_OnTestCharInfo_ReturnsExpectedBreakWeight()
 {
     using (var seg = new PaduakDisposableTestSegment("hello world"))
     {
         IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg);
         IntPtr char_info = Graphite2Api.SegCinfo(seg.Seg, (uint)Graphite2Api.SlotBefore(firstSlot));
         int    bw        = Graphite2Api.CinfoBreakWeight(char_info);
         Assert.AreEqual(-30, bw);
     }
 }