コード例 #1
0
        public void Calculate_1()
        {
            var solution = new _0227_BasicCalculatorII();
            var result   = solution.Calculate("3+2*2");

            Assert.AreEqual(7, result);
        }
コード例 #2
0
        public void Calculate_5()
        {
            var solution = new _0227_BasicCalculatorII();
            var result   = solution.Calculate("0-2147483647");

            Assert.AreEqual(-2147483647, result);
        }
コード例 #3
0
        public void Calculate_6()
        {
            var solution = new _0227_BasicCalculatorII();
            var result   = solution.Calculate("2*3-4");

            Assert.AreEqual(2, result);
        }
コード例 #4
0
        public void Calculate_4()
        {
            var solution = new _0227_BasicCalculatorII();
            var result   = solution.Calculate("1-1+1");

            Assert.AreEqual(1, result);
        }