-
Notifications
You must be signed in to change notification settings - Fork 12
/
with_stdio.rs
49 lines (43 loc) · 1.45 KB
/
with_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
45
46
47
48
49
mod common;
use common::TestInterface;
use task_maker_format::ioi::TestcaseEvaluationStatus::*;
fn with_stdio(test: TestInterface) {
test.success()
.time_limit(1.0)
.memory_limit(64)
.max_score(100.0)
.subtask_scores(vec![100.0])
.must_compile("soluzione.cpp")
.must_compile("wa.cpp")
.must_compile("wrong_file.cpp")
.not_compiled("noop.py")
.solution_score("soluzione.cpp", vec![100.0])
.solution_score("noop.py", vec![0.0])
.solution_score("wa.cpp", vec![50.0])
.solution_score("wrong_file.cpp", vec![0.0])
.solution_statuses("soluzione.cpp", vec![Accepted("Output is correct".into())])
.solution_statuses(
"wa.cpp",
vec![
Accepted("Output is correct".into()),
Accepted("Output is correct".into()),
WrongAnswer("Output is incorrect".into()),
WrongAnswer("Output is incorrect".into()),
],
)
.solution_statuses(
"wrong_file.cpp",
vec![WrongAnswer("Output is incorrect".into())],
)
.solution_statuses("noop.py", vec![WrongAnswer("Output is incorrect".into())]);
}
#[test]
fn with_stdio_local() {
better_panic::install();
with_stdio(TestInterface::run_local("with_stdio"));
}
#[test]
fn with_stdio_remote() {
better_panic::install();
with_stdio(TestInterface::run_remote("with_stdio"));
}