Differences From Artifact [7fcfa63b54]:
- File tests/OFSet.m — part of check-in [05c71bf58b] at 2011-07-21 19:52:47 on branch trunk — Add -[unionSet:] to OFMutableSet. (user: js, size: 3526) [annotate] [blame] [check-ins using]
To Artifact [63f1a92dda]:
- File
tests/OFSet.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: 3511) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
125 126 127 128 129 130 131 | ok = NO; @try { for (OFString *s in mutableSet) [mutableSet removeObject: s]; } @catch (OFEnumerationMutationException *e) { ok = YES; | < | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | ok = NO; @try { for (OFString *s in mutableSet) [mutableSet removeObject: s]; } @catch (OFEnumerationMutationException *e) { ok = YES; } TEST(@"Detection of mutation during Fast Enumeration", ok); #endif [pool drain]; } @end |