Permalink
Browse files

Implemented zero-length sequence test

  • Loading branch information...
1 parent 12e715d commit a30f83e38fa842ce21332a687ad95fcf39d05246 @odrobnik odrobnik committed Mar 10, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 Test/Source/DTASN1SerializationTest.m
@@ -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.