-
Notifications
You must be signed in to change notification settings - Fork 12
/
communication.rs
35 lines (29 loc) · 981 Bytes
/
communication.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
use task_maker_format::ioi::TestcaseEvaluationStatus::*;
mod common;
use common::TestInterface;
fn communication(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("wrong.cpp")
.solution_score("solution.cpp", vec![100.0])
.solution_score("solution.c", vec![100.0])
.solution_score("wrong.cpp", vec![0.0])
.solution_statuses("solution.cpp", vec![Accepted("Ok!".into())])
.solution_statuses("wrong.cpp", vec![WrongAnswer("Ko!".into())])
.file_exists("check/manager");
}
#[test]
fn communication_local() {
better_panic::install();
communication(TestInterface::run_local("communication"));
}
#[test]
fn communication_remote() {
better_panic::install();
communication(TestInterface::run_remote("communication"));
}