Skip to content

Commit

Permalink
Add timing test for large file.
Browse files Browse the repository at this point in the history
  • Loading branch information
kareman committed Jun 30, 2015
1 parent fa08c97 commit bf1ddaa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions FootlessParser.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@
BAC6B2161A61D92B005643D9 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0700;
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = "NotTooBad Software";
TargetAttributes = {
Expand Down
15 changes: 15 additions & 0 deletions tests/Grammar_Tests/CSV.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,19 @@ class CSV: XCTestCase {
}
}
}

func testParseLargeCSVQuotesReturningArray () {
let filepath = pathForTestResource("CSV-quotes-large", type: "csv")
let movieratings = String(contentsOfFile: filepath, encoding: NSUTF8StringEncoding, error: nil)!

measureBlock {
let result = parse(zeroOrMore(row), movieratings)
if let success = result.value {
XCTAssertEqual(success.count, 1715)
} else if let failure = result.error {
XCTFail(failure)
}
}
}

}

0 comments on commit bf1ddaa

Please sign in to comment.