public void TimeExpManagedTest() { GCHandle mt; AprTimeExp t = AprTimeExp.Alloc(out mt); Assert.IsFalse(t.IsNull, "#G01"); Assert.IsTrue(mt.IsAllocated, "#G02"); TimeExpTest1(t, "#G"); t.ClearPtr(); mt.Free(); t = AprTimeExp.Alloc(out mt); Assert.IsFalse(t.IsNull, "#G03"); TimeExpTest2(t, "#G"); t.ClearPtr(); mt.Free(); t = AprTimeExp.Alloc(out mt); Assert.IsFalse(t.IsNull, "#G04"); TimeExpTest3(t, "#G"); t.ClearPtr(); mt.Free(); t = AprTimeExp.Alloc(out mt); Assert.IsFalse(t.IsNull, "#G04"); TimeExpTest4(t, "#G"); mt.Free(); }
public void TimeExpPoolTest() { AprPool p = AprPool.Create(); Assert.IsFalse(p.IsNull, "#F01"); AprTimeExp t = AprTimeExp.Alloc(p); Assert.IsFalse(t.IsNull, "#F02"); TimeExpTest1(t, "#F"); t.ClearPtr(); t = AprTimeExp.Alloc(p); Assert.IsFalse(t.IsNull, "#F03"); TimeExpTest2(t, "#F"); t.ClearPtr(); t = AprTimeExp.Alloc(p); Assert.IsFalse(t.IsNull, "#F04"); TimeExpTest3(t, "#F"); t.ClearPtr(); t = AprTimeExp.Alloc(p); Assert.IsFalse(t.IsNull, "#F04"); TimeExpTest4(t, "#F"); p.Destroy(); Assert.IsTrue(p.IsNull, "#F05"); }
public void TimeExpManagedAlloc() { AprTimeExp t = new AprTimeExp(); Assert.IsTrue(t.IsNull, "#E01"); GCHandle mt; t = AprTimeExp.Alloc(out mt); Assert.IsFalse(t.IsNull, "#E02"); Assert.IsTrue(mt.IsAllocated, "#E03"); mt.Free(); }
public void TimeExpPoolAlloc() { AprPool p = AprPool.Create(); Assert.IsFalse(p.IsNull, "#D01"); AprTimeExp t = new AprTimeExp(); Assert.IsTrue(t.IsNull, "#D02"); t = AprTimeExp.Alloc(p); Assert.IsFalse(t.IsNull, "#D03"); p.Destroy(); Assert.IsTrue(p.IsNull, "#D04"); }