Differences From Artifact [cf2379237f]:
- File
tests/ForwardingTests.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 6611) [annotate] [blame] [check-ins using]
To Artifact [505a6ff075]:
- File
tests/ForwardingTests.m
— part of check-in
[012c6b5786]
at
2017-05-28 11:24:35
on branch trunk
— Make +[resolve{Class,Instance}Method:] return BOOL
Other runtimes expect it to be BOOL, not bool. (user: js, size: 6603) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
64 65 66 67 68 69 70 | static void test(id self, SEL _cmd) { success = true; } @implementation ForwardingTest | | | | | | | | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | static void test(id self, SEL _cmd) { success = true; } @implementation ForwardingTest + (BOOL)resolveClassMethod: (SEL)selector { forwardings++; if (sel_isEqual(selector, @selector(test))) { [self replaceClassMethod: @selector(test) withImplementation: (IMP)test typeEncoding: "v#:"]; return YES; } return NO; } + (BOOL)resolveInstanceMethod: (SEL)selector { forwardings++; if (sel_isEqual(selector, @selector(test))) { [self replaceInstanceMethod: @selector(test) withImplementation: (IMP)test typeEncoding: "v@:"]; return YES; } return NO; } - (id)forwardingTargetForSelector: (SEL)selector { /* * Do some useless calculations in as many registers as possible to * check if the arguments are properly saved and restored. |
︙ | ︙ |