無法弄清楚這裏發生了什麼。 。 。STAssertEqualObjects不能在Xcode中使用OCUnit使用NSString
我有一個簡單的單元測試,旨在測試解析器。測試情況如下:
[parser didStartElement:@"mobileresponse" attributes:[NSDictionary dictionaryWithObject:@"http://www.espn.com/" forKey:@"rooturl"]];
[parser didStartElement:@"content" attributes:[NSDictionary dictionaryWithObject:@"/soccer" forKey:@"mobileFriendlyUrl"]];
NSString *mobileFriendlyURL = [parser valueForKey:@"mobile_friendly_url"];
STAssertEqualObjects(@"http://www.espn.com/soccer", mobileFriendlyURL, @"url path should be appended to root url");
現在這個失敗每次,但這裏是輸出
'http://www.espn.com/soccer' should be equal to 'http://www.espn.com/soccer' url path should be appended to root url
難道我要瘋了或者是那些完全一樣的?有沒有人有任何想法,爲什麼這是拋出一個錯誤?
現場感謝! –