Example #1
0
        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")));
        }
Example #2
0
 public void ParseDestInvalidLong()
 {
     try
     {
         Cinstruction_Accessor.ParseDest("ADDAM");
         Assert.Fail();
     }
     catch (System.FormatException fe)
     {
     }
 }
Example #3
0
 public void ParseDestInvalidValLowercase()
 {
     try
     {
         Cinstruction_Accessor.ParseDest("mda");
         Assert.Fail();
     }
     catch (System.FormatException fe)
     {
     }
 }