Consolidate tests to a single ParserTests target.

This commit is contained in:
Brent Simmons
2024-09-22 11:41:08 -07:00
parent c348ec41b6
commit a2fc8b5dec
61 changed files with 10 additions and 2470 deletions

View File

@@ -0,0 +1,28 @@
//
// RSSInJSONParserTests.swift
// RSParser
//
// Created by Brent Simmons on 6/26/17.
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//
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.parse(d)
}
}
func testFeedLanguage() {
let d = parserData("ScriptingNews", "json", "http://scripting.com/")
let parsedFeed = try! FeedParser.parse(d)!
XCTAssertEqual(parsedFeed.language, "en-us")
}
}