line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::SetError; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
44
|
use strict; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
165
|
|
4
|
8
|
|
|
8
|
|
23
|
use warnings; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
132
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
23
|
use JMAP::Validation::Tests::Object; |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
116
|
|
7
|
8
|
|
|
8
|
|
23
|
use JMAP::Validation::Tests::String; |
|
8
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
1527
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_SetError { |
10
|
768
|
|
|
768
|
0
|
529
|
my ($value) = @_; |
11
|
|
|
|
|
|
|
|
12
|
768
|
50
|
|
|
|
1094
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
13
|
768
|
50
|
|
|
|
1475
|
return unless JMAP::Validation::Tests::String::is_string($value->{type}); |
14
|
|
|
|
|
|
|
|
15
|
768
|
100
|
|
|
|
1485
|
return 1 unless defined $value->{description}; |
16
|
384
|
|
|
|
|
550
|
return JMAP::Validation::Tests::String::is_string($value->{description}); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub is_SetError_invalidProperties { |
20
|
384
|
|
|
384
|
0
|
490
|
my ($value, @valid_properties) = @_; |
21
|
|
|
|
|
|
|
|
22
|
384
|
50
|
|
|
|
374
|
return unless is_SetError($value); |
23
|
384
|
100
|
|
|
|
734
|
return unless $value->{type} eq 'invalidProperties'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my %valid_properties |
26
|
256
|
|
|
|
|
867
|
= map { $_ => 1 } |
|
512
|
|
|
|
|
834
|
|
27
|
|
|
|
|
|
|
@valid_properties; |
28
|
|
|
|
|
|
|
|
29
|
256
|
50
|
|
|
|
475
|
if (defined $value->{properties}) { |
30
|
256
|
50
|
|
|
|
480
|
return unless JMAP::Validation::Tests::Array::is_array($value->{properties}); |
31
|
|
|
|
|
|
|
|
32
|
256
|
|
|
|
|
218
|
foreach my $property (@{$value->{properties}}) { |
|
256
|
|
|
|
|
391
|
|
33
|
0
|
0
|
|
|
|
0
|
return unless $valid_properties{$property}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
256
|
|
|
|
|
627
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub is_SetError_notFound { |
41
|
384
|
|
|
384
|
0
|
302
|
my ($value) = @_; |
42
|
|
|
|
|
|
|
|
43
|
384
|
50
|
|
|
|
399
|
return unless is_SetError($value); |
44
|
384
|
100
|
|
|
|
818
|
return unless $value->{type} eq 'notFound'; |
45
|
|
|
|
|
|
|
|
46
|
256
|
|
|
|
|
1106
|
return 1; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |