Fix bunch of warnings

This commit is contained in:
David Jennes
2022-07-27 02:11:09 +02:00
parent d9a48fbda6
commit 0bbb8005bb
7 changed files with 14 additions and 15 deletions

View File

@@ -117,7 +117,7 @@ final class LexerTests: XCTestCase {
}
func testPerformance() throws {
let path = Path(#file as String) + ".." + "fixtures" + "huge.html"
let path = Path(#file as String) + ".." + "fixtures" + "huge.html"
let content: String = try path.read()
measure {

View File

@@ -63,7 +63,7 @@ final class VariableTests: XCTestCase {
let result = try variable.resolve(self.context) as? String
try expect(result) == "name"
}
it("can resolve a string literal with one double quote") {
let variable = Variable("\"")
let result = try variable.resolve(self.context) as? String
@@ -75,13 +75,13 @@ final class VariableTests: XCTestCase {
let result = try variable.resolve(self.context) as? String
try expect(result) == "name"
}
it("can resolve a string literal with one single quote") {
let variable = Variable("'")
let result = try variable.resolve(self.context) as? String
try expect(result).to.beNil()
}
it("can resolve an integer literal") {
let variable = Variable("5")
let result = try variable.resolve(self.context) as? Int