Differences From Artifact [0db3614a7f]:
- File tests/OFListTests.m — part of check-in [e76a7f52c1] at 2011-04-22 20:19:54 on branch trunk — More style improvements. (user: js, size: 4148) [annotate] [blame] [check-ins using]
To Artifact [ec7c33e58e]:
- File
tests/OFListTests.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 4133) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
143 144 145 146 147 148 149 | ok = NO; @try { for (OFString *obj in list) [list removeListObject: [list lastListObject]]; } @catch (OFEnumerationMutationException *e) { ok = YES; | < | 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | ok = NO; @try { for (OFString *obj in list) [list removeListObject: [list lastListObject]]; } @catch (OFEnumerationMutationException *e) { ok = YES; } TEST(@"Detection of mutation during Fast Enumeration", ok) #endif [pool drain]; } @end |