line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::SetError; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
26
|
use strict; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
167
|
|
4
|
8
|
|
|
8
|
|
22
|
use warnings; |
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
145
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
24
|
use JMAP::Validation::Tests::Object; |
|
8
|
|
|
|
|
8
|
|
|
8
|
|
|
|
|
138
|
|
7
|
8
|
|
|
8
|
|
19
|
use JMAP::Validation::Tests::String; |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
1555
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_SetError { |
10
|
768
|
|
|
768
|
0
|
525
|
my ($value) = @_; |
11
|
|
|
|
|
|
|
|
12
|
768
|
50
|
|
|
|
1123
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
13
|
768
|
50
|
|
|
|
1449
|
return unless JMAP::Validation::Tests::String::is_string($value->{type}); |
14
|
|
|
|
|
|
|
|
15
|
768
|
100
|
|
|
|
1441
|
return 1 unless defined $value->{description}; |
16
|
384
|
|
|
|
|
562
|
return JMAP::Validation::Tests::String::is_string($value->{description}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub is_SetError_invalidProperties { |
20
|
384
|
|
|
384
|
0
|
458
|
my ($value, @valid_properties) = @_; |
21
|
|
|
|
|
|
|
|
22
|
384
|
50
|
|
|
|
368
|
return unless is_SetError($value); |
23
|
384
|
100
|
|
|
|
657
|
return unless $value->{type} eq 'invalidProperties'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my %valid_properties |
26
|
256
|
|
|
|
|
839
|
= map { $_ => 1 } |
|
512
|
|
|
|
|
782
|
|
27
|
|
|
|
|
|
|
@valid_properties; |
28
|
|
|
|
|
|
|
|
29
|
256
|
50
|
|
|
|
436
|
if (defined $value->{properties}) { |
30
|
256
|
50
|
|
|
|
502
|
return unless JMAP::Validation::Tests::Array::is_array($value->{properties}); |
31
|
|
|
|
|
|
|
|
32
|
256
|
|
|
|
|
213
|
foreach my $property (@{$value->{properties}}) { |
|
256
|
|
|
|
|
415
|
|
33
|
0
|
0
|
|
|
|
0
|
return unless $valid_properties{$property}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
256
|
|
|
|
|
639
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub is_SetError_notFound { |
41
|
384
|
|
|
384
|
0
|
313
|
my ($value) = @_; |
42
|
|
|
|
|
|
|
|
43
|
384
|
50
|
|
|
|
418
|
return unless is_SetError($value); |
44
|
384
|
100
|
|
|
|
733
|
return unless $value->{type} eq 'notFound'; |
45
|
|
|
|
|
|
|
|
46
|
256
|
|
|
|
|
1077
|
return 1; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |