public void GrowableArrayQueueRefTypeAddMaxRemoveMax() { IQueue <RefType> queue = new MpscGrowableArrayQueue <RefType>(2, 4); queue.Enqueue(new RefType() { someValue = 1 }); queue.Enqueue(new RefType() { someValue = 2 }); queue.Enqueue(new RefType() { someValue = 3 }); queue.Enqueue(new RefType() { someValue = 4 }); RefType i = queue.Dequeue(); RefType i2 = queue.Dequeue(); RefType i3 = queue.Dequeue(); RefType i4 = queue.Dequeue(); Assert.Equal <int>(4, i4.someValue); }
public void GrowableArrayQueueRefTypeAddRemove() { IQueue <RefType> queue = new MpscGrowableArrayQueue <RefType>(2, 100); queue.Enqueue(new RefType() { someValue = 1 }); RefType i = queue.Dequeue(); Assert.Equal <int>(1, i.someValue); }