public void Negation()
        {
            const int expected = (-3);

            var expression =
                new Negation(
                    new Number(3));

            AssertExpression(expression, expected);
        }
        public void Test_Negation()
        {
            const string expected = "( -3 )";

            var expression =
                new Negation(
                    new Number(3));

            AssertExpression(expression, expected);
        }
 public void VisitNegation(Negation expression)
 {
     string text = m_TextStack.Pop();
     string result = string.Format("( -{0} )", text);
     m_TextStack.Push(result);
 }
 public void VisitNegation(Negation expression)
 {
     int operand = m_OperandStack.Pop();
     int result = -operand;
     m_OperandStack.Push(result);
 }