Skip to content

Commit

Permalink
Test: SIL issues, #file as String
Browse files Browse the repository at this point in the history
  • Loading branch information
kawoou committed Apr 15, 2019
1 parent 3c97368 commit 4020a98
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
6 changes: 2 additions & 4 deletions Tests/StencilTests/EnvironmentSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ final class EnvironmentIncludeTemplateTests: XCTestCase {
override func setUp() {
super.setUp()

let basePath: String = #file
let path = Path(basePath) + ".." + "fixtures"
let path = Path(#file as String) + ".." + "fixtures"
let loader = FileSystemLoader(paths: [path])
environment = Environment(loader: loader)
template = ""
Expand Down Expand Up @@ -292,8 +291,7 @@ final class EnvironmentBaseAndChildTemplateTests: XCTestCase {
override func setUp() {
super.setUp()

let basePath: String = #file
let path = Path(basePath) + ".." + "fixtures"
let path = Path(#file as String) + ".." + "fixtures"
let loader = FileSystemLoader(paths: [path])
environment = Environment(loader: loader)
childTemplate = ""
Expand Down
5 changes: 1 addition & 4 deletions Tests/StencilTests/IncludeSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import Spectre
import XCTest

final class IncludeTests: XCTestCase {
let path: Path = {
let basePath: String = #file
return Path(basePath) + ".." + "fixtures"
}()
let path = Path(#file as String) + ".." + "fixtures"
lazy var loader = FileSystemLoader(paths: [path])
lazy var environment = Environment(loader: loader)

Expand Down
5 changes: 1 addition & 4 deletions Tests/StencilTests/InheritanceSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import Stencil
import XCTest

final class InheritanceTests: XCTestCase {
let path: Path = {
let basePath: String = #file
return Path(basePath) + ".." + "fixtures"
}()
let path = Path(#file as String) + ".." + "fixtures"
lazy var loader = FileSystemLoader(paths: [path])
lazy var environment = Environment(loader: loader)

Expand Down
3 changes: 1 addition & 2 deletions Tests/StencilTests/LexerSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ final class LexerTests: XCTestCase {
}

func testPerformance() throws {
let basePath: String = #file
let path = Path(basePath) + ".." + "fixtures" + "huge.html"
let path = Path(#file as String) + ".." + "fixtures" + "huge.html"
let content: String = try path.read()

measure {
Expand Down
3 changes: 1 addition & 2 deletions Tests/StencilTests/LoaderSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import XCTest

final class TemplateLoaderTests: XCTestCase {
func testFileSystemLoader() {
let basePath: String = #file
let path = Path(basePath) + ".." + "fixtures"
let path = Path(#file as String) + ".." + "fixtures"
let loader = FileSystemLoader(paths: [path])
let environment = Environment(loader: loader)

Expand Down

0 comments on commit 4020a98

Please sign in to comment.