public void TestCaseConstruction3() { var @operator = new BitwiseNotOperator("operator", TypeConverter); Assert.AreEqual("operator", @operator.Symbol); Assert.AreEqual(1, @operator.Precedence); }
public static BitwiseEvaluationStatement CreateNot(BitwiseNotOperator op, EvaluationStatement operand, StatementInfo info, IStatement parentStatement = null) { return(new BitwiseEvaluationStatement(null, op, operand, info) { ParentStatement = parentStatement }); }
public void TestCaseEvaluation() { var @operator = new BitwiseNotOperator(TypeConverter); AssertEvaluation <int>(@operator, 1, ~1); AssertEvaluation <int>(@operator, 0, ~0); AssertEvaluation <int>(@operator, int.MinValue, ~int.MinValue); }
public void TestCaseEvaluationExceptions() { var @operator = new BitwiseNotOperator(TypeConverter); ExpectArgumentNullException("context", () => @operator.Evaluate(null, 1)); }
public void TestCaseConstruction2() { var @operator = new BitwiseNotOperator(TypeConverter); Assert.AreEqual("~", @operator.Symbol); }