public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(Equipment_RemoveItem_Patch.INJECTION_OPCODE)); IEnumerable <CodeInstruction> result = Equipment_RemoveItem_Patch.Transpiler(null, instructions); Assert.AreEqual(108, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(ConstructorInput_OnCraftingBegin_Patch.INJECTION_OPCODE, ConstructorInput_OnCraftingBegin_Patch.INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = ConstructorInput_OnCraftingBegin_Patch.Transpiler(null, instructions); Assert.AreEqual(instructions.Count + 3, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(BuilderTool_HandleInput_Patch.INJECTION_OPCODE, BuilderTool_HandleInput_Patch.INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = BuilderTool_HandleInput_Patch.Transpiler(BuilderTool_HandleInput_Patch.TARGET_METHOD, instructions); Assert.AreEqual(instructions.Count + 5, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(Constructable_Construct_Patch.INJECTION_OPCODE, Constructable_Construct_Patch.INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = Constructable_Construct_Patch.Transpiler(null, instructions); Assert.AreEqual(111, PatchTestHelper.GetInstructionCount(result)); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(ConstructableBase_SetState_Patch.INJECTION_OPCODE, ConstructableBase_SetState_Patch.INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = ConstructableBase_SetState_Patch.Transpiler(ConstructableBase_SetState_Patch.TARGET_METHOD, instructions); Assert.AreEqual(instructions.Count + 2, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(BaseGhost_Finish_Patch.INJECTION_OPCODE, BaseGhost_Finish_Patch.INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = BaseGhost_Finish_Patch.Transpiler(null, instructions); Assert.AreEqual(instructions.Count + 3, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(ClipMapManager_HideEntities_Patch.INJECTION_OPCODE, null)); IEnumerable <CodeInstruction> result = ClipMapManager_HideEntities_Patch.Transpiler(null, instructions); Assert.AreEqual(instructions.Count + 3, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(OpCodes.Call, IngameMenu_QuitGameAsync_Patch.triggerOperand)); IEnumerable <CodeInstruction> result = IngameMenu_QuitGameAsync_Patch.Transpiler(instructions); Assert.AreEqual(instructions.Count, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(Builder_TryPlace_Patch.PLACE_BASE_INJECTION_OPCODE, Builder_TryPlace_Patch.PLACE_BASE_INJECTION_OPERAND)); instructions.Add(new CodeInstruction(Builder_TryPlace_Patch.PLACE_FURNITURE_INJECTION_OPCODE, Builder_TryPlace_Patch.PLACE_FURNITURE_INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = Builder_TryPlace_Patch.Transpiler(null, instructions); Assert.AreEqual(121, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(CrashedShipExploder_Update_Patch.INJECTION_OPCODE, CrashedShipExploder_Update_Patch.INJECTION_OPERAND)); instructions.Add(new CodeInstruction(OpCodes.Brfalse)); IEnumerable <CodeInstruction> result = CrashedShipExploder_Update_Patch.Transpiler(null, instructions); Assert.AreEqual(instructions.Count + 2, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(Constructable_Construct_Patch.AMOUNT_CHANGED_INJECTION_OPCODE, Constructable_Construct_Patch.AMOUNT_CHANGED_INJECTION_OPERAND)); instructions.Add(new CodeInstruction(Constructable_Construct_Patch.CONSTRUCTION_COMPLETE_INJECTION_OPCODE, Constructable_Construct_Patch.CONSTRUCTION_COMPLETE_INJECTION_OPERAND)); IEnumerable <CodeInstruction> result = Constructable_Construct_Patch.Transpiler(null, instructions); Assert.AreEqual(112, result.Count()); }
public void Sanity() { List <CodeInstruction> instructions = PatchTestHelper.GenerateDummyInstructions(100); instructions.Add(new CodeInstruction(CyclopsSonarButton_Update_Patch.INJECTION_OPCODE, CyclopsSonarButton_Update_Patch.INJECTION_OPERAND)); instructions.Add(new CodeInstruction(OpCodes.Callvirt, Reflect.Method((Player player) => player.GetMode()))); instructions.Add(new CodeInstruction(OpCodes.Brtrue)); IEnumerable <CodeInstruction> result = CyclopsSonarButton_Update_Patch.Transpiler(null, instructions); Assert.AreEqual(instructions.Count + 2, result.Count()); }