Exemplo n.º 1
0
 public void TestGetHookMask()
 {
     LuaState L = null;
     using (L = new LuaState())
     {
         Assert.Equal(LuaHookMask.None, L.GetHookMask());
         LuaHook hook = (ILuaState l, LuaDebug ar) => {
         };
         Assert.Throws<NotImplementedException>(() => L.SetHook(hook, LuaHookMask.MaskCall | LuaHookMask.MaskLine | LuaHookMask.MaskCount, 1));
         Assert.Equal(LuaHookMask.None, L.GetHookMask());
     }
 }
Exemplo n.º 2
0
        public void TestSetHook()
        {
            LuaState L = null;
            using (L = new LuaState())
            {
                LuaHook hook = (ILuaState l, LuaDebug ar) => {

                };
                Assert.Throws<NotImplementedException>(() => L.SetHook(hook, LuaHookMask.MaskCall | LuaHookMask.MaskLine | LuaHookMask.MaskCount, 1));
                L.PushNumber(23);
                L.PushFunction(l => {
                    return 0;
                });
                L.PCall(0, 0, 0);
            }
        }