84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
([OFArray arrayWithObjects: @"Foo", @"Foo", @"Foo", @"Baz", nil]));
}
- (void)testReplaceObjectIdenticalToWithObject
{
[_mutableArray insertObject: [[cArray[1] mutableCopy] autorelease]
atIndex: 1];
[_mutableArray replaceObjectIdenticalTo: cArray[1]
withObject: cArray[0]];
OTAssertEqualObjects(_mutableArray,
([OFArray arrayWithObjects: @"Foo", @"Bar", @"Foo", @"Baz", nil]));
}
- (void)testReplaceObjectAtIndexWithObject
{
[_mutableArray replaceObjectAtIndex: 1
withObject: cArray[0]];
|
>
>
|
>
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
([OFArray arrayWithObjects: @"Foo", @"Foo", @"Foo", @"Baz", nil]));
}
- (void)testReplaceObjectIdenticalToWithObject
{
[_mutableArray insertObject: [[cArray[1] mutableCopy] autorelease]
atIndex: 1];
[_mutableArray insertObject: [[cArray[1] mutableCopy] autorelease]
atIndex: 4];
[_mutableArray replaceObjectIdenticalTo: cArray[1]
withObject: cArray[0]];
OTAssertEqualObjects(_mutableArray,
([OFArray arrayWithObjects: @"Foo", @"Bar", @"Foo", @"Baz", @"Bar",
nil]));
}
- (void)testReplaceObjectAtIndexWithObject
{
[_mutableArray replaceObjectAtIndex: 1
withObject: cArray[0]];
|