Exemple #1
0
 public void BasicTest()
 {
     var a=new NumberAllocator(5);
     Assert.Equal(5u, a.Allocate());
     Assert.Equal(6u, a.Allocate());
     a.Deallocate(5);
     Assert.Equal(5u, a.Allocate());
     Assert.Equal(7u, a.Allocate());
 }
Exemple #2
0
 public void BasicTest()
 {
     var a=new NumberAllocator(5);
     Assert.AreEqual(5, a.Allocate());
     Assert.AreEqual(6, a.Allocate());
     a.Deallocate(5);
     Assert.AreEqual(5, a.Allocate());
     Assert.AreEqual(7, a.Allocate());
 }