mirror of
https://github.com/MeiK2333/river.git
synced 2025-11-04 14:49:40 +08:00
Update
This commit is contained in:
parent
b74c6126a8
commit
ae1dca202a
@ -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
|
||||||
|
|||||||
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user