示例#1
0
        public void Transfer()
        {
            var queue = new LLQueue <int>(Enumerable.Range(0, 100));
            var trans = queue.Transfer();

            Assert.IsTrue(queue.IsEmpty);
            int cmp = 0;

            foreach (int i in queue.ToArray())
            {
                Assert.AreEqual(cmp++, i);
            }
        }
示例#2
0
 public void Transfer()
 {
     var queue = new LLQueue<int>(Enumerable.Range(0, 100));
     var trans = queue.Transfer();
     Assert.IsTrue(queue.IsEmpty);
     int cmp = 0;
     foreach(int i in queue.ToArray())
         Assert.AreEqual(cmp++, i);
 }