-1
我必須爲一個任務設置測試用例。我知道爲數字使用STAssertEquals,但我不確定如何測試返回字符串的以下方法。如何對XCode測試一個字符串
-(NSString *) description
{
NSLog(@"\n \n Account information for %@ \n Balance is $%g dollars \n Number of transacrions are: %d \n\n\n\n", [self owner],[self balance], [self numberOfTransactions]);
我會用STAssertsTrue ??嗎?如果是的話,我會如何將它應用於上面的代碼?
您發佈的代碼不會返回任何內容。 – Sebastian