コード例 #1
0
        public void IndexerTest()
        {
            StosWTablicy <char> stos = new StosWTablicy <char>();

            stos.Push('a');
            stos.Push('b');
            stos.Push('c');
            Assert.AreEqual(stos[0], 'a');
            Assert.AreEqual(stos[1], 'b');
            Assert.AreEqual(stos[2], 'c');

            stos.Pop();
            Assert.AreEqual(stos[0], 'a');
            Assert.AreEqual(stos[1], 'b');
        }