27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
OFArray *array;
OFSet *set;
OFEnumerator *enumerator;
/* Boolean */
TEST(@"Parsing of boolean",
![[[OFData dataWithItems: "\x01\x01\x00"
count: 3] objectByParsingASN1DER]
booleanValue] &&
[[[OFData dataWithItems: "\x01\x01\xFF"
count: 3] objectByParsingASN1DER] booleanValue])
EXPECT_EXCEPTION(@"Detection of invalid boolean #1",
OFInvalidFormatException,
[[OFData dataWithItems: "\x01\x01\x01"
count: 3] objectByParsingASN1DER])
EXPECT_EXCEPTION(@"Detection of invalid boolean #2",
|
|
<
|
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
OFArray *array;
OFSet *set;
OFEnumerator *enumerator;
/* Boolean */
TEST(@"Parsing of boolean",
![[[OFData dataWithItems: "\x01\x01\x00"
count: 3] objectByParsingASN1DER] boolValue] &&
[[[OFData dataWithItems: "\x01\x01\xFF"
count: 3] objectByParsingASN1DER] boolValue])
EXPECT_EXCEPTION(@"Detection of invalid boolean #1",
OFInvalidFormatException,
[[OFData dataWithItems: "\x01\x01\x01"
count: 3] objectByParsingASN1DER])
EXPECT_EXCEPTION(@"Detection of invalid boolean #2",
|