This commit is contained in:
MeiK 2020-05-19 18:52:09 +08:00
parent b74c6126a8
commit ae1dca202a
2 changed files with 19 additions and 6 deletions

View File

@ -16,12 +16,12 @@ judge_type: standard # standard / special
# language: cpp # language: cpp
extra_files: extra_files:
- hello.txt - hello.txt
# code: code:
# file: main.c file: main.c
# language: c language: c
# code: # code:
# file: main.cpp # file: main.cpp
# language: cpp # language: cpp
code: # code:
file: main.py # file: main.py
language: python # language: python

View File

@ -1,4 +1,6 @@
use super::error::Result;
use std::fmt; use std::fmt;
use std::path::Path;
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct ResourceUsed { pub struct ResourceUsed {
@ -20,3 +22,14 @@ impl fmt::Display for TestCaseResult {
write!(f, "{:?}", self) write!(f, "{:?}", self)
} }
} }
impl TestCaseResult {
pub fn standard<P: AsRef<Path>>(output_file: P, answer_file: P) -> Result<TestCaseResult> {
let result = TestCaseResult::Accepted(ResourceUsed {
time_used: 0,
memory_used: 0,
});
// TODO: 对比答案文件,返回结果
Ok(result)
}
}