public void FDEF() { InterpreterFuncs funcs = new InterpreterFuncs(); Assert.AreEqual(0, funcs.GetFuncCount()); funcs.FDEF(0, new byte[] { 0 }); Assert.AreEqual(1, funcs.GetFuncCount()); funcs.FDEF(0, new byte[] { 0 }); Assert.AreEqual(1, funcs.GetFuncCount()); }
public void CALL() { InterpreterFuncs funcs = new InterpreterFuncs(); Assert.AreEqual(0, funcs.GetFuncCount()); funcs.FDEF(0, new byte[] { 0x10, 0x20 }); Assert.AreEqual(1, funcs.GetFuncCount()); byte[] data = funcs.CALL(0); Assert.AreEqual(2, data.Length); Assert.AreEqual(0x10, data[0]); Assert.AreEqual(0x20, data[1]); data = funcs.CALL(1); Assert.IsNull(data); }