Esempio n. 1
0
 static TestFSEditLogLoader()
 {
     foreach (FSEditLogOpCodes opCode in FSEditLogOpCodes.Values())
     {
         byteToEnum[opCode.GetOpCode()] = opCode;
     }
 }
Esempio n. 2
0
 public virtual void TestFSEditLogOpCodes()
 {
     //try all codes
     foreach (FSEditLogOpCodes c in FSEditLogOpCodes.Values())
     {
         byte code = c.GetOpCode();
         NUnit.Framework.Assert.AreEqual("c=" + c + ", code=" + code, c, FSEditLogOpCodes.
                                         FromByte(code));
     }
     //try all byte values
     for (int b = 0; b < (1 << byte.Size); b++)
     {
         byte code = unchecked ((byte)b);
         NUnit.Framework.Assert.AreEqual("b=" + b + ", code=" + code, FromByte(code), FSEditLogOpCodes
                                         .FromByte(code));
     }
 }