Пример #1
0
        COperator CreateOperator(OpCodeName nameop)
        {
            string    name = nameop.ToString();
            COperator op   = OpCodes.OperatorFromName(name);

            return(CreateOperator(op));
        }
Пример #2
0
        public void TestGetDescription()
        {
            //OpCodeName.InitGameOpCodeName();

            Assert.AreEqual("编码1", OpCodeName.GetOpCodeDescription(1));
            Assert.AreEqual("编码2", OpCodeName.GetOpCodeDescription(2));
            Assert.AreEqual("Unknow", OpCodeName.GetOpCodeDescription(0));
        }
Пример #3
0
        public void TestGetName()
        {
            //OpCodeName.InitGameOpCodeName();

            Assert.AreEqual("Code1", OpCodeName.GetOpCodeName(1));
            Assert.AreEqual("Code2", OpCodeName.GetOpCodeName(2));
            Assert.AreEqual("Unknow", OpCodeName.GetOpCodeName(0));
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpCode"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="opcodeName">The enum value of the operator.</param>
 /// <param name="operands">The number of operands.</param>
 /// <param name="postscript">The postscript equivalent, or null, if no such operation exists.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="description">The description from Adobe PDF Reference.</param>
 internal OpCode(string name, OpCodeName opcodeName, int operands, string postscript, OpCodeFlags flags, string description)
 {
     Name        = name;
     OpCodeName  = opcodeName;
     Operands    = operands;
     Postscript  = postscript;
     Flags       = flags;
     Description = description;
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OpCode"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="opcodeName">The enum value of the operator.</param>
 /// <param name="operands">The number of operands.</param>
 /// <param name="postscript">The postscript equivalent, or null, if no such operation exists.</param>
 /// <param name="flags">The flags.</param>
 /// <param name="description">The description from Adobe PDF Reference.</param>
 internal OpCode(string name, OpCodeName opcodeName, int operands, string postscript, OpCodeFlags flags, string description)
 {
     Name = name;
     OpCodeName = opcodeName;
     Operands = operands;
     Postscript = postscript;
     Flags = flags;
     Description = description;
 }
Пример #6
0
    public static int Main()
    {
        OpCodeName test = new OpCodeName();

        TestLibrary.TestFramework.BeginTestCase("OpCodeName");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Пример #7
0
    public static int Main()
    {
        OpCodeName test = new OpCodeName();

        TestLibrary.TestFramework.BeginTestCase("OpCodeName");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Пример #8
0
 COperator CreateOperator(OpCodeName nameop)
 {
     string name = nameop.ToString();
     COperator op = OpCodes.OperatorFromName(name);
     return CreateOperator(op);
 }