13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFSet.h"
#import "OFAutoreleasePool.h"
#import "OFArray.h"
#import "TestsAppDelegate.h"
static OFString *module = @"OFSet";
@implementation TestsAppDelegate (OFSetTests)
- (void)setTests
|
>
>
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFSet.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFEnumerationMutationException.h"
#import "TestsAppDelegate.h"
static OFString *module = @"OFSet";
@implementation TestsAppDelegate (OFSetTests)
- (void)setTests
|
102
103
104
105
106
107
108
109
110
111
112
113
|
i++;
}
if (i != 4)
ok = NO;
TEST(@"Fast enumeration", ok)
#endif
[pool drain];
}
@end
|
>
>
>
>
>
>
>
>
>
>
>
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
i++;
}
if (i != 4)
ok = NO;
TEST(@"Fast enumeration", ok)
ok = NO;
@try {
for (OFString *s in mutableSet)
[mutableSet removeObject: s];
} @catch (OFEnumerationMutationException *e) {
ok = YES;
[e dealloc];
}
TEST(@"Detection of mutation during Fast Enumeration", ok);
#endif
[pool drain];
}
@end
|