Fix build failures in OPMLTests. Tests all still pass in RSParser.

This commit is contained in:
Brent Simmons 2017-11-04 10:25:13 -07:00
parent 5b34ed5432
commit 2bb0cdb0ba
1 changed files with 7 additions and 7 deletions

View File

@ -35,14 +35,14 @@ class OPMLTests: XCTestCase {
func recursivelyCheckOPMLStructure(_ item: RSOPMLItem) {
let feedSpecifier = item.opmlFeedSpecifier
let feedSpecifier = item.feedSpecifier
if !(item is RSOPMLDocument) {
XCTAssertNotNil((item.attributes as NSDictionary).opml_text)
XCTAssertNotNil((item.attributes! as NSDictionary).opml_text)
}
// If it has no children, it should have a feed specifier. The converse is also true.
var isFolder = item.children != nil && item.children.count > 0
if !isFolder && (item.attributes as NSDictionary).opml_title == "Skip" {
var isFolder = item.children != nil && item.children!.count > 0
if !isFolder && (item.attributes! as NSDictionary).opml_title == "Skip" {
isFolder = true
}
@ -53,12 +53,12 @@ class OPMLTests: XCTestCase {
else {
XCTAssertNil(feedSpecifier)
if !(item is RSOPMLDocument) {
XCTAssertNotNil((item.attributes as NSDictionary).opml_title)
XCTAssertNotNil((item.attributes! as NSDictionary).opml_title)
}
}
if item.children != nil && item.children.count > 0 {
for oneItem in item.children {
if item.children != nil && item.children!.count > 0 {
for oneItem in item.children! {
recursivelyCheckOPMLStructure(oneItem)
}
}