Commits

Tuukka Norri  committed 4dc1460

Changed the attribute type in the unit tests, too

  • Participants
  • Parent commits 8a3094d

Comments (0)

Files changed (1)

File UnitTests/Sources/PGTSParameterTests.m

 	//Decomposed and astral characters.
 	const char* expected = "teståäöÅÄÖ𐄤𐄧𐄪𐄷";
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [value PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 	const char* value = "\000\001\002\003";
 	size_t valueLength = strlen (value);
 	
-	int length = 0;
+	size_t length = 0;
 	NSData* object = [NSData dataWithBytes: value length: length];
 	id objectValue = [object PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 {
 	NSInteger value = -15;
 	
-	int length = 0;
+	size_t length = 0;
 	NSNumber* object = [NSNumber numberWithInteger: value];
 	id objectValue = [object PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 {
 	double value = -15.2;
 	
-	int length = 0;
+	size_t length = 0;
 	NSNumber* object = [NSNumber numberWithDouble: value];
 	id objectValue = [object PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	//20010105 8:02 am
 	NSDate* object = [NSDate dateWithTimeIntervalSinceReferenceDate: 4 * 86400 + 8 * 3600 + 2 * 60];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [object PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 	NSTimeZone* tz = [NSTimeZone timeZoneForSecondsFromGMT: -3600];
 	NSDate* object = [NSCalendarDate dateWithYear: 2001 month: 1 day: 5 hour: 8 minute: 2 second: 0 timeZone: tz];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [object PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 {
 	NSArray* value = [NSArray arrayWithObjects: @"test", @"-1", nil];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [value PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 - (void) test7Set
 {
 	NSSet* value = [NSSet set];
-	int length = 0;
+	size_t length = 0;
 	MKCAssertThrowsSpecificNamed ([value PGTSParameter: mConnection], NSException, NSInvalidArgumentException);
 	MKCAssertThrowsSpecificNamed ([value PGTSParameterLength: &length connection: mConnection], NSException, NSInvalidArgumentException);
 }
 {
 	NSNull* value = [NSNull null];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [value PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 	NSTimeInterval interval = 263856941.04633799; //This caused problems.
 	NSDate* value = [NSDate dateWithTimeIntervalSinceReferenceDate: interval];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [value PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];
 	
 	NSTimeInterval interval = 263856941.0000002; //Fractional part that rounds to six zeros.
 	NSDate* value = [NSDate dateWithTimeIntervalSinceReferenceDate: interval];
 	
-	int length = 0;
+	size_t length = 0;
 	id objectValue = [value PGTSParameter: mConnection];
 	const char* paramValue = [objectValue PGTSParameterLength: &length connection: mConnection];