CompileConstant() public method

public CompileConstant ( object obj ) : byte
obj object
return byte
Example #1
0
        public void DecompileNamedPrimitive()
        {
            Block block = new Block();
            block.CompileByteCode(ByteCode.NamedPrimitive, block.CompileConstant("do"), block.CompileConstant("mod"));
            BlockDecompiler decompiler = new BlockDecompiler(block);

            var result = decompiler.Decompile();

            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count);
            Assert.AreEqual("NamedPrimitive \"do\" \"mod\"", result[0]);
        }