Пример #1
0
 public virtual void add_current_set()
 {
     foreach (var item in CurrentIDSet.peek())
     {
         AllIDSet.add(item);
     }
     this.CurrentIDSet.push((new hashset <string>()));
 }
Пример #2
0
        public void CanPeekNextValueStack()
        {
            stack cake = new stack();

            cake.push(2);
            cake.push(3);

            Assert.Equal(3, cake.peek());
        }
Пример #3
0
        public void TestPeek()
        {
            stack s = new stack(10);

            s.push(3);
            s.push(5);
            s.push(7);
            Assert.AreEqual(7, s.peek());
            Assert.AreEqual(3, s.count());
        }
Пример #4
0
        public void PeekExceptions()
        {
            stack broken = new stack();

            Assert.Throws <System.IndexOutOfRangeException>(() => broken.peek());
        }
Пример #5
0
 public virtual bool get_func_async()
 {
     return(FuncAsyncStack.peek());
 }