Ejemplo n.º 1
0
 public TestVerdict(MemorySpan usedMemory, TimeSpan usedTime, int exitCode, TypeVerdicts verdict)
 {
     this.UsedMemory = usedMemory;
     this.UsedTime   = usedTime;
     this.ExitCode   = exitCode;
     this.Verdict    = verdict;
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
 public void UpdateVerdict(TypeVerdicts verdict)
 {
     this.Verdict = verdict;
 }