12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "config.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "main.h"
static OFString *module = @"OFArray";
static OFString *c_ary[] = {
@"Foo",
@"Bar",
@"Baz",
nil
};
void
array_tests()
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFArray *a[3];
OFMutableArray *m[2];
OFEnumerator *enumerator;
id obj;
BOOL ok;
|
|
|
|
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "config.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "TestsAppDelegate.h"
static OFString *module = @"OFArray";
static OFString *c_ary[] = {
@"Foo",
@"Bar",
@"Baz",
nil
};
@implementation TestsAppDelegate (OFArrayTests)
- (void)arrayTests
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
OFArray *a[3];
OFMutableArray *m[2];
OFEnumerator *enumerator;
id obj;
BOOL ok;
|
185
186
187
188
189
190
191
|
TEST(@"Detection of mutation during Fast Enumeration", ok)
[m[0] removeNObjects: 1];
#endif
[pool drain];
}
|
>
|
185
186
187
188
189
190
191
192
|
TEST(@"Detection of mutation during Fast Enumeration", ok)
[m[0] removeNObjects: 1];
#endif
[pool drain];
}
@end
|