407
|
1 package IMPL::Test::Result;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
410
|
5 use IMPL::Const qw(:prop);
|
|
6 use IMPL::declare {
|
|
7 base => [
|
|
8 'IMPL::Object' => undef,
|
|
9 'IMPL::Object::Serializable' => '@_'
|
|
10 ],
|
|
11 props => [
|
|
12 name => PROP_RW,
|
|
13 state => PROP_RW,
|
|
14 exception => PROP_RW,
|
|
15 timeExclusive => PROP_RW,
|
|
16 timeInclusive => PROP_RW
|
|
17 ]
|
|
18 };
|
407
|
19
|
|
20 __PACKAGE__->PassThroughArgs;
|
|
21
|
|
22 use constant {
|
|
23 SUCCESS => 0,
|
|
24 FAIL => 1,
|
|
25 ERROR => 2
|
|
26 };
|
|
27
|
|
28 sub CTOR {
|
410
|
29 my $this = shift;
|
|
30
|
|
31 my $fields = @_ == 1 ? $_[0] : {@_};
|
407
|
32
|
410
|
33 $fields->{timeExclusive} ||= 0;
|
|
34 $fields->{timeInclusive} ||= 0;
|
|
35
|
|
36 while (my ($k,$v) = each %$fields) {
|
|
37 $this->$k($v);
|
|
38 }
|
407
|
39 }
|
|
40
|
|
41
|
|
42 1;
|