Differences From Artifact [c47931a3b5]:
- File
tests/OFDictionaryTests.m
— part of check-in
[f816d1ec7c]
at
2016-06-05 15:11:04
on branch trunk
— Move -[setValue:forKey:] to OFDictionary
If this is only overridden in OFMutableDictionary, this would lead to
inconsistent behavior, as it could be called on an OFDictionary as well
due to the fact that -[setValue:forKey:] is defined in OFObject.
Instead, if the dictionary is immutable, an OFUndefinedKeyException is
thrown. (user: js, size: 7224) [annotate] [blame] [check-ins using]
To Artifact [7c197c60f6]:
- File tests/OFDictionaryTests.m — part of check-in [4ad79a7f67] at 2016-06-05 15:50:22 on branch trunk — Fix OFDictionaryTests (user: js, size: 7245) [annotate] [blame] [check-ins using]
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - - + + + | TEST(@"-[valueForKey:]", [[dict valueForKey: keys[0]] isEqual: values[0]] && [[dict valueForKey: @"@count"] isEqual: [OFNumber numberWithSize: 2]]) EXPECT_EXCEPTION(@"Catching -[setValue:forKey:] on immutable " |
︙ |