public void PIC16arch_GetBasicCoreRegisterTests() { PICProcessorModel.GetModel(PIC16BasicName).CreateRegisters(); Assert.AreSame(PICRegisters.WREG, PICRegisters.GetRegister("WREG")); Assert.AreSame(PICRegisters.STATUS, PICRegisters.GetRegister("STATUS")); Assert.AreSame(PICRegisters.PCL, PICRegisters.GetRegister("PCL")); Assert.AreSame(PIC16BasicRegisters.INDF, PICRegisters.GetRegister("INDF")); Assert.AreSame(PIC16BasicRegisters.RP0, PICRegisters.GetBitField("RP0")); Assert.AreSame(PIC16BasicRegisters.RP1, PICRegisters.GetBitField("RP1")); }
public void PIC16arch_GetBasicRegisterFromNameTests() { PICProcessorModel.GetModel(PIC16BasicName).CreateRegisters(); Assert.AreEqual("STATUS", PICRegisters.GetRegister("STATUS").Name); Assert.AreEqual("FSR", PICRegisters.GetRegister("FSR").Name); Assert.AreEqual("INDF", PICRegisters.GetRegister("INDF").Name); Assert.AreEqual("INTCON", PICRegisters.GetRegister("INTCON").Name); Assert.AreEqual("WREG", PICRegisters.GetRegister("WREG").Name); Assert.AreEqual("PCL", PICRegisters.GetRegister("PCL").Name); Assert.AreEqual("PCLATH", PICRegisters.GetRegister("PCLATH").Name); Assert.AreEqual("RP", PICRegisters.GetBitField("RP").Name); }