public void ADD_BYTE_Test() { ushort testOpcode = 0x71aa; //Add aa to V1 memory.opcode = testOpcode; memory.V[1] = 5; instructions.ADD_BYTE(); Assert.AreEqual(5 + 0xaa, memory.V[1], 0, "Did not add byte into register properly"); //Check overflow condition - should top out at 255 memory.V[1] = 250; instructions.ADD_BYTE(); Assert.AreEqual(255, memory.V[1], 0, "Did not overflow correctly"); }