-
Notifications
You must be signed in to change notification settings - Fork 12
/
communication_stdio.rs
44 lines (38 loc) · 1.49 KB
/
communication_stdio.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use task_maker_format::ioi::TestcaseEvaluationStatus::*;
mod common;
use common::TestInterface;
fn communication_stdio(test: TestInterface) {
test.success()
.time_limit(1.0)
.memory_limit(64)
.max_score(100.0)
.subtask_scores(vec![100.0])
.must_compile("solution.cpp")
.must_compile("solution.c")
.must_compile("no_output.cpp")
.must_compile("wrong.cpp")
.must_compile("tle.cpp")
.solution_score("solution.cpp", vec![100.0])
.solution_score("solution.c", vec![100.0])
.solution_score("solution.py", vec![100.0])
.solution_score("no_output.cpp", vec![0.0])
.solution_score("wrong.cpp", vec![0.0])
.solution_score("tle.cpp", vec![0.0])
.solution_statuses("solution.cpp", vec![Accepted("Ok!".into())])
.solution_statuses("solution.c", vec![Accepted("Ok!".into())])
.solution_statuses("solution.py", vec![Accepted("Ok!".into())])
.solution_statuses("no_output.cpp", vec![WrongAnswer("Ko!".into())])
.solution_statuses("wrong.cpp", vec![WrongAnswer("Ko!".into())])
.solution_statuses("tle.cpp", vec![TimeLimitExceeded])
.file_exists("check/manager");
}
#[test]
fn communication_stdio_local() {
better_panic::install();
communication_stdio(TestInterface::run_local("communication_stdio"));
}
#[test]
fn communication_stdio_remote() {
better_panic::install();
communication_stdio(TestInterface::run_remote("communication_stdio"));
}