public void ParseDestTest() { int Mbit = 1; int Dbit = 2; int Abit = 4; Assert.AreEqual(Mbit, ToInt(Cinstruction_Accessor.ParseDest("M"))); Assert.AreEqual(Dbit, ToInt(Cinstruction_Accessor.ParseDest("D"))); Assert.AreEqual(Abit, ToInt(Cinstruction_Accessor.ParseDest("A"))); }
public void ParseDestInvalidLong() { try { Cinstruction_Accessor.ParseDest("ADDAM"); Assert.Fail(); } catch (System.FormatException fe) { } }
public void ParseDestInvalidValLowercase() { try { Cinstruction_Accessor.ParseDest("mda"); Assert.Fail(); } catch (System.FormatException fe) { } }