-
Notifications
You must be signed in to change notification settings - Fork 12
/
communication_with_gen.rs
35 lines (29 loc) · 1.04 KB
/
communication_with_gen.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_with_gen(test: TestInterface) {
test.success()
.time_limit(1.0)
.memory_limit(64)
.max_score(100.0)
.subtask_scores(vec![50.0, 50.0])
.must_compile("solution.cpp")
.must_compile("solution.c")
.must_compile("wrong.cpp")
.solution_score("solution.cpp", vec![50.0, 50.0])
.solution_score("solution.c", vec![50.0, 50.0])
.solution_score("wrong.cpp", vec![0.0, 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_with_gen_local() {
better_panic::install();
communication_with_gen(TestInterface::run_local("communication_with_gen"));
}
#[test]
fn communication_with_gen_remote() {
better_panic::install();
communication_with_gen(TestInterface::run_remote("communication_with_gen"));
}