void Remove_works(Instruction[] data, Instruction instr, bool expected, Instruction[] expectedData) { var list = new InstructionList(data); var result = list.Remove(instr); Assert.Equal(expected, result); var listElems = new Instruction[list.Count]; list.CopyTo(listElems); AssertEqual(expectedData, listElems); }