示例#1
0
 public _Iterator4Impl_82(NonblockingQueue _enclosing, List4 origInsertionPoint, List4
                          origNext, List4 baseArg1) : base(baseArg1)
 {
     this._enclosing         = _enclosing;
     this.origInsertionPoint = origInsertionPoint;
     this.origNext           = origNext;
 }
		public virtual void TestIterator()
		{
			IQueue4 queue = new NonblockingQueue();
			string[] data = new string[] { "a", "b", "c", "d" };
			for (int idx = 0; idx < data.Length; idx++)
			{
				AssertIterator(queue, data, idx);
				queue.Add(data[idx]);
				AssertIterator(queue, data, idx + 1);
			}
		}
示例#3
0
			public _Iterator4Impl_82(NonblockingQueue _enclosing, List4 origInsertionPoint, List4
				 origNext, List4 baseArg1) : base(baseArg1)
			{
				this._enclosing = _enclosing;
				this.origInsertionPoint = origInsertionPoint;
				this.origNext = origNext;
			}
		public virtual void TestNext()
		{
			IQueue4 queue = new NonblockingQueue();
			string[] data = new string[] { "a", "b", "c" };
			queue.Add(data[0]);
			Assert.AreSame(data[0], queue.Next());
			queue.Add(data[1]);
			queue.Add(data[2]);
			AssertNext(new object[] { data[1], data[2] }, queue);
		}
		private IQueue4 NewQueue(object[] items)
		{
			NonblockingQueue queue = new NonblockingQueue();
			for (int i = 0; i < items.Length; i++)
			{
				queue.Add(items[i]);
			}
			return queue;
		}