@@ -281,66 +281,57 @@ TEST(@"-[getReturnValue]", R([invocation getReturnValue: &st2]) && memcmp(&st, &st2, sizeof(st)) == 0) memset(&st2, '\0', sizeof(st2)); - TEST(@"-[setArgument:atIndex:] #1", R([invocation setArgument: &c - atIndex: 2])) - - TEST(@"-[setArgument:atIndex:] #2", R([invocation setArgument: &i - atIndex: 3])) - - TEST(@"-[setArgument:atIndex:] #3", R([invocation setArgument: &stp - atIndex: 4])) - - TEST(@"-[setArgument:atIndex:] #4", R([invocation setArgument: &st - atIndex: 5])) - - TEST(@"-[getArgument:atIndex:] #1", R([invocation getArgument: &c2 - atIndex: 2]) && - c == c2) - - TEST(@"-[getArgument:atIndex:] #2", R([invocation getArgument: &i2 - atIndex: 3]) && - i == i2) - - TEST(@"-[getArgument:atIndex:] #3", R([invocation getArgument: &stp2 - atIndex: 4]) && - stp == stp2) - - TEST(@"-[getArgument:atIndex:] #4", R([invocation getArgument: &st2 - atIndex: 5]) && + TEST(@"-[setArgument:atIndex:] #1", + R([invocation setArgument: &c atIndex: 2])) + + TEST(@"-[setArgument:atIndex:] #2", + R([invocation setArgument: &i atIndex: 3])) + + TEST(@"-[setArgument:atIndex:] #3", + R([invocation setArgument: &stp atIndex: 4])) + + TEST(@"-[setArgument:atIndex:] #4", + R([invocation setArgument: &st atIndex: 5])) + + TEST(@"-[getArgument:atIndex:] #1", + R([invocation getArgument: &c2 atIndex: 2]) && c == c2) + + TEST(@"-[getArgument:atIndex:] #2", + R([invocation getArgument: &i2 atIndex: 3]) && i == i2) + + TEST(@"-[getArgument:atIndex:] #3", + R([invocation getArgument: &stp2 atIndex: 4]) && stp == stp2) + + TEST(@"-[getArgument:atIndex:] #4", + R([invocation getArgument: &st2 atIndex: 5]) && memcmp(&st, &st2, sizeof(st)) == 0) #ifdef OF_INVOCATION_CAN_INVOKE /* -[invoke] #1 */ selector = @selector(invocationTestMethod2:); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; - [invocation setArgument: &self - atIndex: 2]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; + [invocation setArgument: &self atIndex: 2]; TEST(@"-[invoke] #1", R([invocation invoke])) /* -[invoke] #2 */ selector = @selector(invocationTestMethod3::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) - [invocation setArgument: &j - atIndex: j + 1]; + [invocation setArgument: &j atIndex: j + 1]; int intResult; TEST(@"-[invoke] #2", R([invocation invoke]) && R([invocation getReturnValue: &intResult]) && intResult == 8) @@ -347,19 +338,16 @@ /* -[invoke] #3 */ selector = @selector(invocationTestMethod4::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { double d = j; - [invocation setArgument: &d - atIndex: j + 1]; + [invocation setArgument: &d atIndex: j + 1]; } double doubleResult; TEST(@"-[invoke] #3", R([invocation invoke]) && R([invocation getReturnValue: &doubleResult]) && @@ -368,25 +356,21 @@ /* -[invoke] #4 */ selector = @selector(invocationTestMethod5::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { float f = j; double d = j; if (j == 1 || j == 10) - [invocation setArgument: &d - atIndex: j + 1]; + [invocation setArgument: &d atIndex: j + 1]; else - [invocation setArgument: &f - atIndex: j + 1]; + [invocation setArgument: &f atIndex: j + 1]; } float floatResult; TEST(@"-[invoke] #4", R([invocation invoke]) && R([invocation getReturnValue: &floatResult]) && floatResult == 8.5) @@ -396,19 +380,16 @@ /* -[invoke] #5 */ selector = @selector(invocationTestMethod6::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { long double d = j; - [invocation setArgument: &d - atIndex: j + 1]; + [invocation setArgument: &d atIndex: j + 1]; } long double longDoubleResult; TEST(@"-[invoke] #5", R([invocation invoke]) && R([invocation getReturnValue: &longDoubleResult]) && @@ -419,25 +400,21 @@ /* -[invoke] #6 */ selector = @selector(invocationTestMethod7::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { complex float cf = j + 0.5 * j * I; complex double cd = j + 0.5 * j * I; if (j & 1) - [invocation setArgument: &cf - atIndex: j + 1]; + [invocation setArgument: &cf atIndex: j + 1]; else - [invocation setArgument: &cd - atIndex: j + 1]; + [invocation setArgument: &cd atIndex: j + 1]; } complex double complexDoubleResult; TEST(@"-[invoke] #6", R([invocation invoke]) && R([invocation getReturnValue: &complexDoubleResult]) && @@ -449,32 +426,27 @@ /* -[invoke] #7 */ selector = @selector(invocationTestMethod8::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { complex double cd = j + 0.5 * j * I; complex float cf = j + 0.5 * j * I; complex long double cld = j + 0.5 * j * I; switch (j % 3) { case 0: - [invocation setArgument: &cld - atIndex: j + 1]; + [invocation setArgument: &cld atIndex: j + 1]; break; case 1: - [invocation setArgument: &cd - atIndex: j + 1]; + [invocation setArgument: &cd atIndex: j + 1]; break; case 2: - [invocation setArgument: &cf - atIndex: j + 1]; + [invocation setArgument: &cf atIndex: j + 1]; break; } } complex long double complexLongDoubleResult; @@ -488,26 +460,22 @@ /* -[invoke] #8 */ selector = @selector(invocationTestMethod9::::::::::::::::); invocation = [OFInvocation invocationWithMethodSignature: [self methodSignatureForSelector: selector]]; - [invocation setArgument: &self - atIndex: 0]; - [invocation setArgument: &selector - atIndex: 1]; + [invocation setArgument: &self atIndex: 0]; + [invocation setArgument: &selector atIndex: 1]; for (int j = 1; j <= 16; j++) { __extension__ __int128 i128 = 0xFFFFFFFFFFFFFFFF; i128 <<= 64; i128 |= j; if (j == 1 || j == 5) - [invocation setArgument: &j - atIndex: j + 1]; + [invocation setArgument: &j atIndex: j + 1]; else - [invocation setArgument: &i128 - atIndex: j + 1]; + [invocation setArgument: &i128 atIndex: j + 1]; } __extension__ __int128 int128Result; TEST(@"-[invoke] #8", R([invocation invoke]) && R([invocation getReturnValue: &int128Result]) &&