Make RSS-in-JSON tests work.

This commit is contained in:
Brent Simmons
2024-09-21 11:20:23 -07:00
parent 887ef8c22e
commit ecfe504d9d
3 changed files with 198 additions and 197 deletions

View File

@@ -9,20 +9,20 @@
import XCTest
import FeedParser
//class RSSInJSONParserTests: XCTestCase {
//
// func testScriptingNewsPerformance() {
//
// // 0.003 sec on my 2012 iMac.
// let d = parserData("ScriptingNews", "json", "http://scripting.com/")
// self.measure {
// let _ = try! FeedParser.parseSync(d)
// }
// }
//
// func testFeedLanguage() {
// let d = parserData("ScriptingNews", "json", "http://scripting.com/")
// let parsedFeed = try! FeedParser.parseSync(d)!
// XCTAssertEqual(parsedFeed.language, "en-us")
// }
//}
class RSSInJSONParserTests: XCTestCase {
func testScriptingNewsPerformance() {
// 0.003 sec on my 2012 iMac.
let d = parserData("ScriptingNews", "json", "http://scripting.com/")
self.measure {
let _ = try! FeedParser.parse(d)
}
}
func testFeedLanguage() {
let d = parserData("ScriptingNews", "json", "http://scripting.com/")
let parsedFeed = try! FeedParser.parse(d)!
XCTAssertEqual(parsedFeed.language, "en-us")
}
}