public CompileJumpByteCodeAt ( ByteCode b, short jump, int position ) : void | ||
b | ByteCode | |
jump | short | |
position | int | |
Результат | void |
public void CompileJumpAt() { Block block = new Block(); block.CompileByteCode((ByteCode)1); block.CompileByteCode((ByteCode)2); block.CompileByteCode((ByteCode)3); block.CompileInsert(1, 3); block.CompileJumpByteCodeAt(ByteCode.Jump, 10, 1); Assert.AreEqual(6, block.Bytecodes.Length); Assert.AreEqual(1, block.Bytecodes[0]); Assert.AreEqual((byte)ByteCode.Jump, block.Bytecodes[1]); Assert.AreEqual(0, block.Bytecodes[2]); Assert.AreEqual(10, block.Bytecodes[3]); Assert.AreEqual(2, block.Bytecodes[4]); Assert.AreEqual(3, block.Bytecodes[5]); }