Support problem parameters outside meta
[gruntmaster-daemon.git] / t / FakeData.pm
1 package Gruntmaster::Data;
2 use v5.14;
3 use warnings;
4 use parent qw/Exporter/;
5
6 BEGIN { $INC{'Gruntmaster/Data.pm'} = 1; }
7
8 my (@jobs, %problems);
9
10 sub job_inmeta { $jobs[$_[0]]{inmeta} };
11 sub set_job_inmeta { $jobs[$_[0]]{inmeta} = $_[1] };
12 sub job_problem { $jobs[$_[0]]{problem} };
13 sub set_job_problem { $jobs[$_[0]]{problem} = $_[1] };
14
15 sub set_job_result { $jobs[$_[0]]{result} = $_[1] };
16 sub set_job_result_text { $jobs[$_[0]]{result_text} = $_[1] };
17 sub set_job_results { $jobs[$_[0]]{results} = $_[1] };
18 sub set_job_errors { $jobs[$_[0]]{errors} = $_[1] };
19 sub set_job_daemon { $jobs[$_[0]]{daemon} = $_[1] };
20
21 sub problem_meta { $problems{$_}{meta} }
22 sub set_problem_meta { $problems{$_[0]}{meta} = $_[1] }
23 sub problem_generator {}
24 sub problem_runner {}
25 sub problem_judge {}
26 sub problem_testcnt {}
27 sub problem_timeout {}
28 sub problem_olimit {}
29
30 sub get_job { $jobs[$_[0]] }
31
32 sub PUBLISH {}
33 sub SUBSCRIBE {}
34 sub WAIT_FOR_MESSAGES {}
35
36 our @EXPORT = do {
37 no strict 'refs';
38 grep { $_ =~ /^[a-zA-Z]/ and exists &$_ } keys %{__PACKAGE__ . '::'};
39 };
40
41 1
This page took 0.021099 seconds and 4 git commands to generate.