Beispiel #1
0
        public void DazelCompiler_TryRun_SucceedOnValidSourceCode()
        {
            DazelCompiler dazelCompiler = new DazelCompiler(TestCode1_1, TestCode1_2);

            bool TestDelegate() => dazelCompiler.TryRun(out _);

            Assert.True(TestDelegate());
            Assert.DoesNotThrow(() => TestDelegate());
        }
Beispiel #2
0
        public void DazelCompiler_TryRun_ThrowOnInvalidSourceCode()
        {
            UnityEngine.TestTools.LogAssert.ignoreFailingMessages = true;
            DazelCompiler dazelCompiler = new DazelCompiler(TestCode2_1, TestCode2_2);

            DazelLogger.ThrowExceptions = false;

            Assert.False(dazelCompiler.TryRun(out _));
        }