mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-05 03:37:41 +00:00
Organize RSParserTests so structure matches module structure.
This commit is contained in:
1 parent
fea534ea7d
commit
75c7d7da0d
27 files changed
No files matched your search
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// HTMLMetadataPerformanceTests.swift
|
||||
// RSParserTests
|
||||
//
|
||||
// Created by Brent Simmons on 4/19/26.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import RSParser
|
||||
|
||||
// Performance tests stay in XCTest — Swift Testing doesn't have a `measure { }` equivalent yet.
|
||||
|
||||
final class HTMLMetadataPerformanceTests: XCTestCase {
|
||||
|
||||
func testDaringFireballPerformance() {
|
||||
// 0.002 sec on my 2012 iMac
|
||||
let d = parserData("DaringFireball", "html", "http://daringfireball.net/")
|
||||
self.measure {
|
||||
_ = HTMLMetadataParser.htmlMetadata(with: d)
|
||||
}
|
||||
}
|
||||
|
||||
func testFurboPerformance() {
|
||||
// 0.001 sec on my 2012 iMac
|
||||
let d = parserData("furbo", "html", "http://furbo.org/")
|
||||
self.measure {
|
||||
_ = HTMLMetadataParser.htmlMetadata(with: d)
|
||||
}
|
||||
}
|
||||
|
||||
func testInessentialPerformance() {
|
||||
// 0.001 sec on my 2012 iMac
|
||||
let d = parserData("inessential", "html", "http://inessential.com/")
|
||||
self.measure {
|
||||
_ = HTMLMetadataParser.htmlMetadata(with: d)
|
||||
}
|
||||
}
|
||||
|
||||
func testCocoPerformance() {
|
||||
// 0.004 sec on my 2012 iMac
|
||||
let d = parserData("coco", "html", "https://www.theatlantic.com/entertainment/archive/2017/11/coco-is-among-pixars-best-movies-in-years/546695/")
|
||||
self.measure {
|
||||
_ = HTMLMetadataParser.htmlMetadata(with: d)
|
||||
}
|
||||
}
|
||||
|
||||
func testSixColorsPerformance() {
|
||||
// 0.002 sec on my 2012 iMac
|
||||
let d = parserData("sixcolors", "html", "http://sixcolors.com/")
|
||||
self.measure {
|
||||
_ = HTMLMetadataParser.htmlMetadata(with: d)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user