NetNewsWire/Frameworks/RSParser/RSParserTests/JSONFeedParserTests.swift

33 lines
648 B
Swift
Raw Normal View History

2017-06-27 15:56:03 +02:00
//
// JSONFeedParserTests.swift
// RSParser
//
// Created by Brent Simmons on 6/26/17.
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
//
import XCTest
import RSParser
class JSONFeedParserTests: XCTestCase {
func testInessentialPerformance() {
// 0.001 sec on my 2012 iMac.
let d = parserData("inessential", "json", "http://inessential.com/")
self.measure {
let _ = try! FeedParser.parse(d)
}
}
func testDaringFireballPerformance() {
// 0.009 sec on my 2012 iMac.
let d = parserData("DaringFireball", "json", "http://daringfireball.net/")
self.measure {
let _ = try! FeedParser.parse(d)
}
}
}