line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JMAP::Validation::Tests::SetError; |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
26
|
use strict; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
164
|
|
4
|
8
|
|
|
8
|
|
18
|
use warnings; |
|
8
|
|
|
|
|
9
|
|
|
8
|
|
|
|
|
172
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
22
|
use JMAP::Validation::Tests::Object; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
103
|
|
7
|
8
|
|
|
8
|
|
21
|
use JMAP::Validation::Tests::String; |
|
8
|
|
|
|
|
7
|
|
|
8
|
|
|
|
|
1556
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub is_SetError { |
10
|
768
|
|
|
768
|
0
|
551
|
my ($value) = @_; |
11
|
|
|
|
|
|
|
|
12
|
768
|
50
|
|
|
|
1134
|
return unless JMAP::Validation::Tests::Object::is_object($value); |
13
|
768
|
50
|
|
|
|
1330
|
return unless JMAP::Validation::Tests::String::is_string($value->{type}); |
14
|
|
|
|
|
|
|
|
15
|
768
|
100
|
|
|
|
1389
|
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
|
457
|
my ($value, @valid_properties) = @_; |
21
|
|
|
|
|
|
|
|
22
|
384
|
50
|
|
|
|
395
|
return unless is_SetError($value); |
23
|
384
|
100
|
|
|
|
635
|
return unless $value->{type} eq 'invalidProperties'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my %valid_properties |
26
|
256
|
|
|
|
|
848
|
= map { $_ => 1 } |
|
512
|
|
|
|
|
851
|
|
27
|
|
|
|
|
|
|
@valid_properties; |
28
|
|
|
|
|
|
|
|
29
|
256
|
50
|
|
|
|
465
|
if (defined $value->{properties}) { |
30
|
256
|
50
|
|
|
|
458
|
return unless JMAP::Validation::Tests::Array::is_array($value->{properties}); |
31
|
|
|
|
|
|
|
|
32
|
256
|
|
|
|
|
205
|
foreach my $property (@{$value->{properties}}) { |
|
256
|
|
|
|
|
413
|
|
33
|
0
|
0
|
|
|
|
0
|
return unless $valid_properties{$property}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
256
|
|
|
|
|
617
|
return 1; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub is_SetError_notFound { |
41
|
384
|
|
|
384
|
0
|
291
|
my ($value) = @_; |
42
|
|
|
|
|
|
|
|
43
|
384
|
50
|
|
|
|
358
|
return unless is_SetError($value); |
44
|
384
|
100
|
|
|
|
738
|
return unless $value->{type} eq 'notFound'; |
45
|
|
|
|
|
|
|
|
46
|
256
|
|
|
|
|
1062
|
return 1; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |