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
extra_files:
- hello.txt
# code:
# file: main.c
# language: c
code:
file: main.c
language: c
# code:
# file: main.cpp
# language: cpp
code:
file: main.py
language: python
# code:
# file: main.py
# language: python

View File

@ -1,4 +1,6 @@
use super::error::Result;
use std::fmt;
use std::path::Path;
#[derive(Debug, Copy, Clone)]
pub struct ResourceUsed {
@ -20,3 +22,14 @@ impl fmt::Display for TestCaseResult {
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)
}
}