public void DownstreamStrength_2BytesToLong() { LongHandler r = new LongHandler("dummy", "dummy", 1); ushort register1 = 3477; // register 93 r.ParseRegisters(register1); Assert.AreEqual(typeof(System.Int32), r.Data.GetType()); Assert.AreEqual(3477, r.Data); }
public void Test2DecToLong() { LongHandler r = new LongHandler("dummy", "dummy", 1); ushort register1 = 23; // register 9 ushort register2 = 0; // register 10 r.ParseRegisters(register1, register2); Assert.AreEqual(typeof(System.Int32), r.Data.GetType()); Assert.AreEqual(23, r.Data); }
public void NegativeAccumulator_4BytesToLong() { LongHandler r = new LongHandler("dummy", "dummy", 1); ushort register1 = 65480; // register 21 ushort register2 = 65535; // register 22 r.ParseRegisters(register1, register2); Assert.AreEqual(typeof(System.Int32), r.Data.GetType()); Assert.AreEqual(-56, r.Data); }