Differences From Artifact [75808adfc5]:
- File
tests/OFArrayTests.m
— part of check-in
[05196e511a]
at
2016-06-05 15:00:33
on branch trunk
— Implement Key Value Coding for OFArray
If the key starts with an @, the @ is stripped and the super method is
called. Otherwise, this returns the value for all objects / sets the
value for all objects. (user: js, size: 9913) [annotate] [blame] [check-ins using]
To Artifact [1774d6c94a]:
- File
tests/OFArrayTests.m
— part of check-in
[134c19b100]
at
2016-06-05 20:07:30
on branch trunk
— Fix -[OFArray valueForKey:]
Contrary to what the documentation stated, it did not actually call
super when the key was starting with an @. (user: js, size: 10035) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
322 323 324 325 326 327 328 | }]) #endif TEST(@"-[valueForKey:]", [[[OFArray arrayWithObjects: @"foo", @"bar", @"quxqux", nil] valueForKey: @"length"] isEqual: [OFArray arrayWithObjects: [OFNumber numberWithSize: 3], | | > > | 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | }]) #endif TEST(@"-[valueForKey:]", [[[OFArray arrayWithObjects: @"foo", @"bar", @"quxqux", nil] valueForKey: @"length"] isEqual: [OFArray arrayWithObjects: [OFNumber numberWithSize: 3], [OFNumber numberWithSize: 3], [OFNumber numberWithSize: 6], nil]] && [[[OFArray arrayWithObjects: @"1", @"2", nil] valueForKey: @"@count"] isEqual: [OFNumber numberWithSize: 2]]) m[0] = [OFMutableArray arrayWithObjects: [OFURL URLWithString: @"http://foo.bar/"], [OFURL URLWithString: @"http://bar.qux/"], [OFURL URLWithString: @"http://qux.quxqux/"], nil]; TEST(@"-[setValue:forKey:]", R([m[0] setValue: [OFNumber numberWithShort: 1234] |
︙ | ︙ |