Skip to content

Commit

Permalink
Implemented zero-length sequence test
Browse files Browse the repository at this point in the history
  • Loading branch information
odrobnik committed Mar 10, 2013
1 parent 12e715d commit a30f83e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Test/Source/DTASN1SerializationTest.m
Expand Up @@ -35,4 +35,16 @@ - (void)testBitString
STAssertTrue([@"101" isEqualToString:asString], @"Result should be 101");
}

// a sequence with no contents should still be returned as array
- (void)testDecodingEmptySequence
{
NSString *string = @"MAA=";
NSData *data = [DTBase64Coding dataByDecodingString:string];

id object = [DTASN1Serialization objectWithData:data];

STAssertNotNil(object, @"Should be able to decode as array");
STAssertTrue([object isKindOfClass:[NSArray class]], @"Decoded object should be an array");
}

@end

0 comments on commit a30f83e

Please sign in to comment.