private static void CallJob(ref DivideByZeroJob job)
    {
        job.Run();

        // Even though job.Run() throws an exception in its body, the job system catches
        // that exception and handles it. So this statement is hit.
        job.I++;
    }
    public void CallJobFromFunctionPointer()
    {
        IJobBurstSchedulableExtensions.JobStruct <DivideByZeroJob> .Initialize();

        var funcPtr = BurstCompiler.CompileFunctionPointer <CallJobDelegate>(CallJob);
        var job     = new DivideByZeroJob {
            I = 0
        };

        funcPtr.Invoke(ref job);
        Assert.AreEqual(job.I, 1);
    }