STAssertEquals([subdatalength],(NSUInteger)subdataLengthForSubdataTests,@"Subdata was not of expected length");
constchar*bytes=[subdatabytes];
//Cast explanation: Character literals are of type int. STAssertEquals also checks that the two sides are of the same type, and const char is not int, so the assertion fails unless we cast the literals to const char.
STAssertEquals(bytes[0],(constchar)'b',@"Unexpected first byte of subdata: 0x%x %c",bytes[0],bytes[0]);
STAssertEquals(bytes[1],(constchar)'a',@"Unexpected second byte of subdata: 0x%x %c",bytes[1],bytes[1]);
STAssertEquals(bytes[2],(constchar)'r',@"Unexpected third byte of subdata: 0x%x %c",bytes[2],bytes[2]);
STAssertEquals([subdatalength],(NSUInteger)subdataLengthForSubdataTests,@"Subdata was not of expected length");
constchar*bytes=[subdatabytes];
//Cast explanation: Character literals are of type int. STAssertEquals also checks that the two sides are of the same type, and const char is not int, so the assertion fails unless we cast the literals to const char.
STAssertEquals(bytes[0],(constchar)'f',@"Unexpected first byte of subdata: 0x%x %c",bytes[0],bytes[0]);
STAssertEquals(bytes[1],(constchar)'o',@"Unexpected second byte of subdata: 0x%x %c",bytes[1],bytes[1]);
STAssertEquals(bytes[2],(constchar)'o',@"Unexpected third byte of subdata: 0x%x %c",bytes[2],bytes[2]);