Commit 8347abdf authored by Drew's avatar Drew

__FILE__=>#file

parent 0cabd0a6
Pipeline #1154 failed with stage
......@@ -19,7 +19,7 @@ import Foundation
extension String : ErrorType {}
enum test {
static func assert(condition: Bool, file: String = __FILE__, functionName: String = __FUNCTION__, line: Int = __LINE__) throws {
static func assert(condition: Bool, file: String = #file, functionName: String = #function, line: Int = #line) throws {
if !condition {
print(" \(file):\(line) \(functionName) **FAILED**")
throw "atpkg.tests.failed"
......
......@@ -31,7 +31,7 @@ class PackageTests: Test {
]
let filename = __FILE__
let filename = #file
static func testBasic() throws {
let filepath = "./tests/collateral/basic.atpkg"
......
......@@ -39,7 +39,7 @@ class LexerTests: Test {
LexerTests.testBasic
]
let filename = __FILE__
let filename = #file
static func testBasic() throws {
let filepath = "./tests/collateral/basic.atpkg"
......
......@@ -22,7 +22,7 @@ class ParserTests: Test {
ParserTests.testBasic
]
let filename = __FILE__
let filename = #file
static func testBasic() throws {
let filepath = "./tests/collateral/basic.atpkg"
......
......@@ -41,7 +41,7 @@ class ScannerTests: Test {
ScannerTests.testBasicClj
]
let filename = __FILE__
let filename = #file
static func testBasicClj() throws {
let filepath = "./tests/collateral/basic.atpkg"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment