mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Add userInfo accessor to NSProgress.
This commit is contained in:
parent
57eae2e779
commit
8ca4381676
3 changed files with 13 additions and 2 deletions
|
@ -6,11 +6,17 @@
|
|||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSDictionary *dict = [NSDictionary dictionary];
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
[dict setObject:@"value" forKey:@"key"];
|
||||
NSProgress *progress = [[NSProgress alloc] initWithParent: nil
|
||||
userInfo: dict];
|
||||
PASS(progress != nil, "[NSProgress initWithParent:userInfo:] returns instance");
|
||||
|
||||
PASS_EQUAL([progress userInfo], dict, @"[NSProgress userInfo] returns correct user info");
|
||||
|
||||
[progress setUserInfoObject:@"new value" forKey:@"key"];
|
||||
PASS_EQUAL([[progress userInfo] objectForKey:@"key"], @"new value", @"[NSProgress setUserInfoObject:forKey:] updates user info");
|
||||
|
||||
progress = [NSProgress discreteProgressWithTotalUnitCount:100];
|
||||
PASS(progress != nil, "[NSProgress discreteProgressWithTotalUnitCount:] returns instance");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue