Differences From Artifact [2a96ab0844]:
- File tests/OFASN1DERValueTests.m — part of check-in [cfed9215e4] at 2018-10-14 22:41:52 on branch trunk — Add ASN.1 Object Identifier type (user: js, size: 18037) [annotate] [blame] [check-ins using]
To Artifact [589ffdef13]:
- File
tests/OFASN1DERValueTests.m
— part of check-in
[b1944fd052]
at
2018-10-27 13:01:38
on branch trunk
— Do not subclass OFASN1Value
The reason for this is that OFASN1Value requires an initializer for DER
encoding, however, it might be beneficial to create an ASN.1 type
without providing DER encoding for it. (user: js, size: 18017) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include "config.h" #import "OFData.h" #import "OFASN1BitString.h" #import "OFASN1Boolean.h" #import "OFASN1IA5String.h" #import "OFASN1Integer.h" | < > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #include "config.h" #import "OFData.h" #import "OFASN1BitString.h" #import "OFASN1Boolean.h" #import "OFASN1IA5String.h" #import "OFASN1Integer.h" #import "OFASN1NumericString.h" #import "OFASN1ObjectIdentifier.h" #import "OFASN1OctetString.h" #import "OFASN1PrintableString.h" #import "OFASN1UTF8String.h" #import "OFArray.h" #import "OFNull.h" #import "OFNumber.h" #import "OFSet.h" #import "OFString.h" #import "OFAutoreleasePool.h" #import "TestsAppDelegate.h" |
︙ | ︙ | |||
185 186 187 188 189 190 191 | EXPECT_EXCEPTION(@"Detection of truncated octet string", OFTruncatedDataException, [[OFData dataWithItems: "\x04\x01" count: 2] ASN1DERValue]) /* Null */ TEST(@"Parsing of null", [[[OFData dataWithItems: "\x05\x00" | | < | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | EXPECT_EXCEPTION(@"Detection of truncated octet string", OFTruncatedDataException, [[OFData dataWithItems: "\x04\x01" count: 2] ASN1DERValue]) /* Null */ TEST(@"Parsing of null", [[[OFData dataWithItems: "\x05\x00" count: 2] ASN1DERValue] isEqual: [OFNull null]]) EXPECT_EXCEPTION(@"Detection of invalid null", OFInvalidFormatException, [[OFData dataWithItems: "\x05\x01\x00" count: 3] ASN1DERValue]) /* Object Identifier */ TEST(@"Parsing of Object Identifier", |
︙ | ︙ |