 		}
 		XCTAssertEqual(i, numberoflines)
 		XCTAssert(result != "")
-		f.closeFile()
+		(f as NSFileHandle).closeFile()
 		return times
 	}
-	
+
 	func testWhenSplitFileAsStringBecomesQuicker() {
 		let splitarray = allSpeedsSplitFileAsString()
 		let myarray = allSpeedIterateOverFile()

			}
			XCTAssertEqual(i, self.numberoflines)
			XCTAssert(result != "")
			f.closeFile()
		}
	}
	
	// takes a very long time
	func testSpeedSwiftSplit () {
		let longtextpath = pathForTestResource("long text", type: "txt")
		self.measureBlock(){
			let f = open(longtextpath)
			let text = f.read()
			
			var i = 0
			var result = ""
			for line in split(text, { $0 == "\n"}, allowEmptySlices: true) {


	func testSpeedNSStringSplit () {

		// won't work outside of a method (XCode 6.1.1 6A2006)
		let longtextpath = pathForTestResource("long text", type: "txt")

		self.measureBlock() {
			let f = open(longtextpath)
			let text = f.read()
			let array = (text.split("\n"))

			var i = 0
			var result = ""
			for line in array {
