Пример #1
0
        public void TestDivisionTop2()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Push(1);
            SOI.Push(11);
            SOI.Push(21);
            SOI.DivisionTop2();
            Assert.AreEqual((double)21 / (double)11, SOI.StackInt.Peek());
        }
Пример #2
0
        public void TestDivsionTop2Exception()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Push(1);
            try
            {
                SOI.DivisionTop2();
                Assert.Fail();
            }
            catch (Exception)
            {
            }
        }