swift format

This commit is contained in:
Adam Fowler
2021-03-15 18:24:06 +00:00
parent 955e1eb9e4
commit 66edcba185
18 changed files with 306 additions and 313 deletions

View File

@@ -1,5 +1,5 @@
import XCTest
@testable import HummingbirdMustache
import XCTest
final class TemplateParserTests: XCTestCase {
func testText() throws {
@@ -75,15 +75,15 @@ extension HBMustacheTemplate: Equatable {
extension HBMustacheTemplate.Token: Equatable {
public static func == (lhs: HBMustacheTemplate.Token, rhs: HBMustacheTemplate.Token) -> Bool {
switch (lhs, rhs) {
case (.text(let lhs), .text(let rhs)):
case let (.text(lhs), .text(rhs)):
return lhs == rhs
case (.variable(let lhs, let lhs2), .variable(let rhs, let rhs2)):
case let (.variable(lhs, lhs2), .variable(rhs, rhs2)):
return lhs == rhs && lhs2 == rhs2
case (.section(let lhs1, let lhs2, let lhs3), .section(let rhs1, let rhs2, let rhs3)):
case let (.section(lhs1, lhs2, lhs3), .section(rhs1, rhs2, rhs3)):
return lhs1 == rhs1 && lhs2 == rhs2 && lhs3 == rhs3
case (.invertedSection(let lhs1, let lhs2, let lhs3), .invertedSection(let rhs1, let rhs2, let rhs3)):
case let (.invertedSection(lhs1, lhs2, lhs3), .invertedSection(rhs1, rhs2, rhs3)):
return lhs1 == rhs1 && lhs2 == rhs2 && lhs3 == rhs3
case (.partial(let name1), .partial(let name2)):
case let (.partial(name1), .partial(name2)):
return name1 == name2
default:
return false