示例#1
0
        public void Rent_Success_RentFromEmptySlab()
        {
            var slab = new SlabAllocatedPool <CellPass>(16, 16);

            var rental = slab.Rent();

            rental.Elements.Should().NotBeNull();

            slab.RentalTideLevel.Should().Be(0);

            var rental2 = slab.Rent();

            rental2.Elements.Should().NotBeNull();
            rental2.Elements.Length.Should().Be(slab.ArraySize);
            rental2.Elements.Should().NotBeSameAs(rental.Elements);
        }
示例#2
0
        public void Rent_Success_RentFromSlab()
        {
            var slab = new SlabAllocatedPool <CellPass>(1024, 16);

            var rental = slab.Rent();

            rental.Elements.Should().NotBeNull();
        }