Exemple #1
0
        public void RemoveMethodResolverTest()
        {
            LoadJitexTest();
            JitexManager.Remove();

            MethodInfo method = GetMethod <ModuleTests>(nameof(MethodToCompileOnRemove));

            MethodToCompileOnRemove();
            bool called = MethodsCompiled.Contains(method);

            Assert.False(called, "Method resolver called!");
        }
Exemple #2
0
        public void DisableTest()
        {
            LoadJitexTest();
            JitexManager.DisableJitex();

            MethodInfo method = GetMethod <ManagerTest>(nameof(MethodToCompileOnDisabled));

            MethodToCompileOnDisabled();
            bool called = MethodsCompiled.Contains(method);

            Assert.False(called, "Method resolver called!");
        }
Exemple #3
0
        public void EnableTest()
        {
            LoadJitexTest();
            JitexManager.DisableJitex();
            JitexManager.EnableJitex();

            MethodInfo method = GetMethod <ManagerTest>(nameof(MethodToCompileOnEnable));

            MethodToCompileOnEnable();
            bool called = MethodsCompiled.Contains(method);

            Assert.True(called, "Method resolver not called!");
        }