예제 #1
0
파일: PostFix.cs 프로젝트: 65001/AbMath
        public void Reset()
        {
            RPN test = new RPN("x^2").Compute();

            PostFix math = new PostFix(test);

            Assert.AreEqual(4, math.SetVariable("x", 2).Compute());

            math.Reset();
            Assert.AreEqual(9, math.SetVariable("x", 3).Compute());

            math.Reset();
            Assert.AreEqual(16, math.SetVariable("x", 4).Compute());
        }