我有以下测试,失败
NSString * expectedValue = @"achilles";
UIPasteboard *pasteboard = [UIPasteboard pasteboardWithName:@"pb1" create:YES];
pasteboard.persistent = YES;
pasteboard.string = expectedValue;
STAssertEqualObjects(expectedValue, [pasteboard string], @"get written value from pasteboard");
[pasteboard setString:expectedValue];
STAssertEqualObjects(expectedValue, [pasteboard string], @"get written value from pasteboard");
两个断言都失败了,
'achilles' should be equal to '(null)'
我是否错误地写入粘贴板,从粘贴板读取,或两者兼而有之?