public TestVerdict(MemorySpan usedMemory, TimeSpan usedTime, int exitCode, TypeVerdicts verdict) { this.UsedMemory = usedMemory; this.UsedTime = usedTime; this.ExitCode = exitCode; this.Verdict = verdict; }
public TestVerdict CheckTime(ExecutionOutput executionOutput, ExecutingOptions executingOptions) { TypeVerdicts verdict = TypeVerdicts.OK; if (executionOutput.Time.TotalMilliseconds < executingOptions.TimeLimit.TotalMilliseconds) { verdict = TypeVerdicts.TimeLimit; } return(new TestVerdict(executionOutput.Memory, executionOutput.Time, executionOutput.ExitCode, verdict)); }
public TestVerdict CheckMemory(ExecutionOutput executionOutput, ExecutingOptions executingOptions) { TypeVerdicts verdict = TypeVerdicts.OK; if (executionOutput.Memory.TotalKilobytes > executingOptions.MemoryLimit.TotalKilobytes) { verdict = TypeVerdicts.MemoryLimit; } return(new TestVerdict(executionOutput.Memory, executionOutput.Time, executionOutput.ExitCode, verdict)); }
public void UpdateVerdict(TypeVerdicts verdict) { this.Verdict = verdict; }