private IEnumerable CheckBurstJobDisabled() { BurstCompiler.Options.EnableBurstCompilation = false; yield return(null); using (var jobTester = new BurstJobTester()) { var result = jobTester.Calculate(); Assert.AreEqual(0.0f, result); } }
public IEnumerator CheckBurstFunctionPointerException() { BurstCompiler.Options.EnableBurstCompileSynchronously = true; BurstCompiler.Options.EnableBurstCompilation = true; yield return(null); using (var jobTester = new BurstJobTester()) { var exception = Assert.Throws <InvalidOperationException>(() => jobTester.CheckFunctionPointer()); StringAssert.Contains("Exception was thrown from a function compiled with Burst", exception.Message); } }
public IEnumerator CheckBurstJobDisabled() { JobsUtility.JobCompilerEnabled = false; yield return(null); yield return(null); yield return(null); yield return(null); yield return(null); using (var jobTester = new BurstJobTester()) { var result = jobTester.Calculate(); Assert.AreEqual(0.0f, result); } }
public IEnumerator CheckBurstJobEnabled() { JobsUtility.JobCompilerEnabled = true; // BurstCompiler.Options.EnableBurstCompileSynchronously = true; yield return(null); yield return(null); yield return(null); yield return(null); yield return(null); using (var jobTester = new BurstJobTester()) { var result = jobTester.Calculate(); Assert.AreNotEqual(0.0f, result); } }