public void SegNSlots_OnTestSeg_ReturnsExpectedNumberOfSlots() { using (var seg = new PaduakDisposableTestSegment("hello world")) { Assert.AreEqual(11, Graphite2Api.SegNSlots(seg.Seg)); } }
public void SegAdvanceY_OnTestSeg_ReturnsExpectedAdvance() { using (var seg = new PaduakDisposableTestSegment("hello world")) { Assert.AreEqual(0.0f, Graphite2Api.SegAdvanceY(seg.Seg)); } }
public void SegJustify_OnATestSegment_DoesNotThrowException() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Graphite2Api.SegJustify(seg.Seg, slot, seg.Font, 100, 0, IntPtr.Zero, IntPtr.Zero); } }
public void SlotNextInSegment_OnFirstSlotInPaduakTestSegment_ReturnsNonNullSlot() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreNotEqual(IntPtr.Zero, Graphite2Api.SlotNextInSegment(slot)); } }
public void SlotOriginY_TestSegFirstSlot_ReturnsExpectedOffset() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0, Graphite2Api.SlotOriginY(firstSlot)); } }
public void SlotAdvanceY_OnTestSeg_ReturnsExpecedAdvance() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0.0f, Graphite2Api.SlotAdvanceY(slot, seg.Face, seg.Font)); } }
public void SlotIndex_OnTestSlot_ReturnsExpectedIndex() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0, (uint)Graphite2Api.SlotIndex(firstSlot)); } }
public void SlotAttr_OnTestSegLastSlot_ReturnsExpectedAttributeValue() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(526, Graphite2Api.SlotAttr(firstSlot, seg.Seg, 0, 0)); } }
public void SlotCanInsertBefore_OnTestSegLastSlot_ReturnsTrue() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(1, Graphite2Api.SlotCanInsertBefore(firstSlot)); } }
public void SlotOriginal_OnTestSegLastSlot_ReturnsExpectedCharInfoValue() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(10, Graphite2Api.SlotOriginal(firstSlot)); } }
public void SlotLinebreakBefore_OnATestSlot_DoesNotThrowException() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Graphite2Api.SlotLinebreakBefore(firstSlot); } }
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); } }
public void SlotAttachedTo_TestSegFirstSlot_ReturnsNullSlotPtr() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr parentSlot = Graphite2Api.SlotAttachedTo(firstSlot); Assert.AreEqual(IntPtr.Zero, parentSlot); } }
public void SlotNextSiblingAttachment_TestSegFirstSlot_ReturnsNonNullSlotPtr() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr slot = Graphite2Api.SlotNextSiblingAttachment(firstSlot); Assert.AreNotEqual(IntPtr.Zero, slot); } }
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)); } }
public void CinfoUnicodeChar_OnTestCinfo_ReturnsExpectecCharacter() { 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(104, Graphite2Api.CinfoUnicodeChar(char_info)); } }
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); } }
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); } }
public void SlotPrevInSegment_OnSecondSlotInPaduakTestSegment_ReturnsNonNullSlot() { using (var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr secondSlot = Graphite2Api.SlotNextInSegment(firstSlot); Assert.AreNotEqual(IntPtr.Zero, Graphite2Api.SlotPrevInSegment(secondSlot), "returned null slot"); Assert.AreEqual(firstSlot, Graphite2Api.SlotPrevInSegment(secondSlot), "should equal first slot"); } }
public void SegAdvanceY_OnTestSeg_ReturnsExpectedAdvance() { using(var seg = new PaduakDisposableTestSegment("hello world")) { Assert.AreEqual(0.0f, Graphite2Api.SegAdvanceY(seg.Seg)); } }
public void SegJustify_OnATestSegment_DoesNotThrowException() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Graphite2Api.SegJustify(seg.Seg, slot, seg.Font, 100, 0, IntPtr.Zero, IntPtr.Zero); } }
public void SegNSlots_OnTestSeg_ReturnsExpectedNumberOfSlots() { using(var seg = new PaduakDisposableTestSegment("hello world")) { Assert.AreEqual(11, Graphite2Api.SegNSlots(seg.Seg)); } }
public void SlotAdvanceY_OnTestSeg_ReturnsExpecedAdvance() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0.0f, Graphite2Api.SlotAdvanceY(slot, seg.Face, seg.Font)); } }
public void SlotAttachedTo_TestSegFirstSlot_ReturnsNullSlotPtr() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr parentSlot = Graphite2Api.SlotAttachedTo(firstSlot); Assert.AreEqual(IntPtr.Zero, parentSlot); } }
public void SlotAttr_OnTestSegLastSlot_ReturnsExpectedAttributeValue() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(526, Graphite2Api.SlotAttr(firstSlot, seg.Seg, 0, 0)); } }
public void SlotCanInsertBefore_OnTestSegLastSlot_ReturnsTrue() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(1, Graphite2Api.SlotCanInsertBefore(firstSlot)); } }
public void SlotIndex_OnTestSlot_ReturnsExpectedIndex() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0, (uint)Graphite2Api.SlotIndex(firstSlot)); } }
public void SlotLinebreakBefore_OnATestSlot_DoesNotThrowException() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Graphite2Api.SlotLinebreakBefore(firstSlot); } }
public void SlotNextInSegment_OnFirstSlotInPaduakTestSegment_ReturnsNonNullSlot() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr slot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreNotEqual(IntPtr.Zero, Graphite2Api.SlotNextInSegment(slot)); } }
public void SlotNextSiblingAttachment_TestSegFirstSlot_ReturnsNonNullSlotPtr() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr slot = Graphite2Api.SlotNextSiblingAttachment(firstSlot); Assert.AreNotEqual(IntPtr.Zero, slot); } }
public void SlotOriginal_OnTestSegLastSlot_ReturnsExpectedCharInfoValue() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegLastSlot(seg.Seg); Assert.AreEqual(10, Graphite2Api.SlotOriginal(firstSlot)); } }
public void SlotOriginY_TestSegFirstSlot_ReturnsExpectedOffset() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); Assert.AreEqual(0, Graphite2Api.SlotOriginY(firstSlot)); } }
public void SlotPrevInSegment_OnSecondSlotInPaduakTestSegment_ReturnsNonNullSlot() { using(var seg = new PaduakDisposableTestSegment("hello world")) { IntPtr firstSlot = Graphite2Api.SegFirstSlot(seg.Seg); IntPtr secondSlot = Graphite2Api.SlotNextInSegment(firstSlot); Assert.AreNotEqual(IntPtr.Zero, Graphite2Api.SlotPrevInSegment(secondSlot), "returned null slot"); Assert.AreEqual(firstSlot, Graphite2Api.SlotPrevInSegment(secondSlot), "should equal first slot"); } }
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); } }